__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Last edited by BubikolRamios; 12-09-2012 at 09:26 AM..
Yeah, tested the thing in chrome, before submiting here.
Not to mention hours lost, before 'lamp' turned on: "Damn, there something smell bad about .test".
I had .test in a loop and "a" string has been changing and on every second loop bad result.
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Last edited by BubikolRamios; 12-09-2012 at 11:21 AM..
As with exec (or in combination with it), test called multiple times on the same global regular expression instance will advance past the previous match.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
If you remove the "g" global modifier - which is not relevant to test() - then it behaves as expected.
Added: I won't have JavaScript besmirched
(only joshing!)
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Last edited by AndrewGSW; 12-09-2012 at 11:27 AM..