Hi,
I wanted to check if this was correct be behavior before reporting it as a
bug in FireFox.
Given this function:
function test()
{
var re;
re = /^(.+)\@(.+?)$/gi;
if (re.exec("test@ example.com") != null)
{
alert("Match");
} else {
alert("Null");
}
return;
}
Should it alternately between displaying "Match" and "Null" each time it's
called?
I would think that since the regex and the string are always the same if
should always display "Match"???
What I am seeing is that it alternates.
If this is proper behavior, why?
Gary
I wanted to check if this was correct be behavior before reporting it as a
bug in FireFox.
Given this function:
function test()
{
var re;
re = /^(.+)\@(.+?)$/gi;
if (re.exec("test@ example.com") != null)
{
alert("Match");
} else {
alert("Null");
}
return;
}
Should it alternately between displaying "Match" and "Null" each time it's
called?
I would think that since the regex and the string are always the same if
should always display "Match"???
What I am seeing is that it alternates.
If this is proper behavior, why?
Gary
Comment