[Webkit-unassigned] [Bug 210576] Certain regexes with nested groups fail to match
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Apr 19 16:42:16 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=210576
--- Comment #5 from Ross Kirsling <ross.kirsling at sony.com> ---
Alexey noticed that my shrunken regex in comment 0 succeeds with a `u` flag, but the original regex does not. If we unshrink just a bit, this fails:
/(?:\w+-)+((\w){5,8})-((\w){5,8}-)*\1/u.test('de-gregory-gregory')
...which may suggest multiple issues at play.
I also kept trying ways to further shrink/restrict the comment 0 regex and noticed that the following fails (with or without `u`):
/^(?:aa~)+(?:a){2,3}~aa?a?a?$/.test('aa~aa~aaaa')
...so nested groups may not be necessary, but that (?:a){2,3} is really important. It needs to be a quantified group with a lower bound greater than 1 and an upper bound greater than the lower bound. (Presumably the bound restrictions are needed so that it doesn't get automatically simplified?)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200419/005621b5/attachment.htm>
More information about the webkit-unassigned
mailing list