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

Also update .lastIndex on natively sticky regexps #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pygy
Copy link
Contributor

@pygy pygy commented Feb 16, 2017

As mentioned in #154 (comment) regexps that have both the global and sticky flag ignore the former and do sticky matches. So there's nothing special to add to their handling AFAICT.

@pygy
Copy link
Contributor Author

pygy commented Feb 16, 2017

Wait, there's more... I haven't updated fixed.exec (and I wonder how the tests actually pass).

Looking deeper into this, I should also probably revise XRegexp.match and possibly other methods. It's late though, and I'm starting to get hazy. I'll ping you when it is ready.

@slevithan
Copy link
Owner

Hey, no rush! And thanks. :D

@slevithan
Copy link
Owner

In case it's helpful, http://2ality.com/2015/07/regexp-es6.html describes the rules for lastIndex with /y in detail.

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

Successfully merging this pull request may close these issues.

2 participants