Closed
Bug 444935
Opened 17 years ago
Closed 14 years ago
in regexps (regular expressions) empty string should not be matched when 'min' repetitions have been matched.
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mozilla, Unassigned)
Details
in the following example the last line should not evaluate to true.
var a = /()?/.exec("a")
a[1] === ''
according to the spec the '?'-operator is equivalent to {0,1} with the minimum repetition being 0. Once the minimum-repetitions have been matched empty strings should not be matched in repetitions.
Incidentally /(){0,1}/ does not work either.
Not sure if this is related to bug 444926.
Comment 1•14 years ago
|
||
My patch in pull request #22 ( https://github.com/mozilla/rhino/pull/22 ) will fix this bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•