xregexp icon indicating copy to clipboard operation
xregexp copied to clipboard

Also update .lastIndex on natively sticky regexps

Open pygy opened this issue 8 years ago • 3 comments

As mentioned in https://github.com/slevithan/xregexp/pull/154#issuecomment-280164443 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 avatar Feb 16 '17 21:02 pygy

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.

pygy avatar Feb 16 '17 22:02 pygy

Hey, no rush! And thanks. :D

slevithan avatar Feb 17 '17 08:02 slevithan

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

slevithan avatar Apr 17 '17 06:04 slevithan