Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope of backtracking for chunk manipulation purposes? #1

Open
bmeck opened this issue Feb 17, 2023 · 1 comment
Open

Scope of backtracking for chunk manipulation purposes? #1

bmeck opened this issue Feb 17, 2023 · 1 comment

Comments

@bmeck
Copy link
Collaborator

bmeck commented Feb 17, 2023

for a given set of text manipulating chunks: a and b and a pattern p:

// any <br> following another <br>
let p = /(?<=<br>)<br>/
let a = ''
let b = '<br>'

Match results from b would change if a changed to <br>. When matching just b individually it would be good to know if it backtracked to the start of b for lookbehind not just if it reached the end of b.

This is a slight oddity due to less ecosystem data on lookbehind. This could be in or out of scope depending.

@bmeck
Copy link
Collaborator Author

bmeck commented Feb 21, 2023

I'd note opaque boundaries in Java using useTransparentBounds do allow this and and some other things like PCRE2_INFO_MAXLOOKBEHIND allow this to some extent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant