Incorrect regex matching of a dot with a quantifier with a lower bound of 0

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
5 years ago
3 years ago

People

(Reporter: mhaymo, Unassigned)

Tracking

22 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

http://regexpal.com/?flags=gm&regex=^.{0%2C2}[%2F\\]bar[%2F\\].*%24&input=C%3A\opt\foo\bar\lol%0Alol%0A%2Fbar%2Flol%0AC%3A\bar\lol%0Abar%0A%2Fbar%0A%2Fbar%2F%0A


Actual results:

Lines 1, 3, 4 and 7 are matched


Expected results:

The first line should not be matched, and isn't on Chrome or Internet Explorer. The same thing is happening when you replace `.{0,2}` with `.?`, so the bug seems to depend on a quantifier with a lower bound of zero. And it only seems to happen with the dot.
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Build ID: 20130812030209

I can confirm this issue on the latest Nightly (the issue is not reproducible on Firefox 4.0).
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

4 years ago
Assignee: general → nobody
No longer reproducible, /^.{0,2}[/\\]bar[/\\].*$/.exec("C:opt\foo\barlol") returns null. Resolving as WFM.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.