Lookahead and boundaries work inconsistently in find regexes
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce:
- On this page, press
/and enter the querynot. Note that there
are some matches, including matches like “notifications”. Cycle
through them withn. - Then, press
/and enter the query\bnot\b. Note that the UI says
that there are fewer matches, but in fact you cycle through the same
set of matches as before. - Similarly, try
not(?= ). The UI lists the correct number of
matches, but actually selects extraneous results.
Chrome 71.0.3578.98 (Official Build) (64-bit) on Linux. Vimium 1.64.3.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Chrome by opening find with /, searching for not, \bnot\b, and not(?= ), then cycling matches with n. Trace the find and match-selection flow; done means the UI's reported count and the results selected by n agree for these regex queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100