View Single Post
Old 12-09-2012, 12:17 PM   PM User | #7
007julien
Regular Coder

 
Join Date: May 2012
Location: France
Posts: 115
Thanks: 0
Thanked 17 Times in 15 Posts
007julien is an unknown quantity at this point
It is the same thing with prompt or confirm and if an "a" take place of s !

In short (See this MDN page *) you have to restore the regexPattern.lastIndex to 0 before each new test !

Good to know. Thanks !

(*) Or better ECMAScript Language Specification 15.10.6.2 and 15.10.6.3
007julien is offline   Reply With Quote