[Webkit-unassigned] [Bug 216671] New: Regex: optional start of string assertion fails
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 17 16:15:39 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216671
Bug ID: 216671
Summary: Regex: optional start of string assertion fails
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jridgewell at google.com
Re: https://github.com/Polymer/lit-html/pull/1218#discussion_r489158205
We've discovered that Safari's regex engine fails to match optional start of string position assertions, eg `/(^a)?B/`.
```js
const cases = [
'aB',
'bB',
'B',
];
for (const s of cases) {
if (!/(^a)?B/.test(s)) {
throw new Error(s);
}
}
```
Open your console on https://output.jsbin.com/finowid/1/quiet to see it run.
--
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/20200917/6fc55000/attachment-0001.htm>
More information about the webkit-unassigned
mailing list