Fixed test cases for non-global regexp. case - the result array should be

exactly the same as that returned by simply 'exec'ing the regexp against
the input string.
This commit is contained in:
rogerl%netscape.com 1999-08-03 00:51:23 +00:00
parent 473da06e9d
commit ed8e8dbacf

View File

@ -63,7 +63,7 @@
"re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex =0",
s,
s.lastIndexOf("0"),
["02134", ]);
["02134", "02134"]);
re.lastIndex = s.length;
@ -82,7 +82,7 @@
s.lastIndexOf("0"),
s,
s.lastIndexOf("0"),
["02134"]);
["02134", "02134"]);
re.lastIndex = s.lastIndexOf("0") + 1;