Closed Bug 427823 Opened 17 years ago Closed 10 years ago

/(x?\1)x/.exec("x") fails

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: x00000000, Unassigned)

References

()

Details

/(x?\1)x/.exec("x") should succeed because backreferences should be ignored if their captures are undefined, and they can only be defined on the right hand side of their right parenthesis. Debugging shows that the capture is set to "x" after the first try to match /(x{1}\1)x/ and so the second try /(x{0}\1)x/ translates to /(x)x/ instead of /()x/. This is related to bug 369778.
Assignee: general → nobody
No longer reproducible, /(x?\1)x/.exec("x") returns ["x", ""]. Resolving as WFM.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.