Closed
Bug 387683
Opened 17 years ago
Closed 17 years ago
RegExp.test() returns inconsistent results
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: andrew.neitsch, Unassigned)
Details
Attachments
(1 file)
376 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 The javascript var val = "06/06/2007"; var re = /^[0-9 \/:]*$/ig; document.write(re.test(val) + '<br>'); document.write(re.test(val) + '<br>'); document.write(re.test(val) + '<br>'); prints "true false true". Since neither val or re has changed, I expect re.test(val) to always return true. Reproducible: Always
Reporter | ||
Comment 1•17 years ago
|
||
Updated•17 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•