fent / fent/randexp.js

Lookaheads generate content and negative lookaheads have no effect

Open
#18 11 comments 6 reactions 0 assignees View on GitHub
bug feature
Dominant language
JavaScript
Stars
1.9k
Forks
94
PR merge metrics
No merged PRs in 30d

Description

Lookaheads are only assertions that the following character(s) match, but don't actually consume characters. It seems randexp generates random content for them, however:

```
^(?=a).$ // can only match a single "a" but generates two characters ("a" and a random one)
```

Negative lookaheads should remove possible matches ahead, but randexp ignores them:

```
^(?!a)[a-b]$ // can only match "b" but also generates "a"
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.