-
Notifications
You must be signed in to change notification settings - Fork 509
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
returning false when calling test() multiple times #74
Comments
|
as per http://blog.stevenlevithan.com/archives/es3-regexes-broken thnx for the input. |
this library is supposed to provide the abstractions for the low level regex intricacies. |
Well this is more then an year old but you know what they say better late then never 😄 . This is the expected behavior for a regex with the Here we have some code to better understand this: var reg = /fn/g;
reg.test('hello') // => false
reg.lastIndex // => 0
reg.test('some fn text') // => true
reg.lastIndex // => 7
reg.test('some fn text') // => false
reg.lastIndex // => 0
reg.test('some fn text fn me me') // => true
reg.test('some fn text fn me me') // => true
reg.test('some fn text fn me me') // => false If you need to prevent this you can set the |
Closing this one as this is the expected behavior. |
returning false for the given example test on Firefox Nightly (v30) & Chrome 32.0.1700.107
![ff30-test-fail](https://camo.githubusercontent.com/9b6b13dbe65488c87ef4f20746ece3774f429392663331f0c5d8b677af8bedfe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f37393838372f323132353037352f31633161346462652d393234622d313165332d383363652d6131633063626362393535632e706e67)
The text was updated successfully, but these errors were encountered: