You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("non-capturing groups should not capture with expression",()=>{constre=newRegExp("(?:^|\\s|-)\\S","g");constinput="hello, great-world";letmatch=exec(re,input);expect(match.matches.length).toBe(1);expect(match.matches[0]).toBe("h");match=exec(re,input);expect(match.matches.length).toBe(1);expect(match.matches[0]).toBe(" g");// this fails and return the second letter (and each consecutive exec will return all the letters)match=exec(re,input);expect(match.matches.length).toBe(1);expect(match.matches[0]).toBe("-w");});
Awesome, thanks a lot for this feedbacks! I'll try to give it a shot ASAP, not sure exactly when though (hopefully in the next few months).
And definitely +1 to throwing if not supported :-)
Hello!
Here is the test to reproduce the issue:
While in Javascript:
Or on one line:
Happy to give it a shot, if you have any hint where to start looking it would probably save me a lot of time :-)
Thanks!
The text was updated successfully, but these errors were encountered: