| Summary: | Incorrect matching of regular expressions | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yeting Li <N2107163D> | ||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | fpizlo, msaboff, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 437607 [details] demo code For some regexes with backreferences and optional groupings, for example, the regex /(a)?(b)\1/ should not match the string "b", but JavaScriptCore determines the regex /(a)?(b)\1/ matching the string "b". It should be pointed out that the semantics of the regex /(a)?(b)\1/ and the regex /(a?)(b)\1/ are different. Specifically, the regex /(a)?(b)\1/ does not match the string "b", and the regex /(a?)(b)\1/ matches the string "b".