[Webkit-unassigned] [Bug 272274] New: RegExp.prototype[Symbol.matchAll] doesn't respect `v` flag
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Apr 6 00:04:16 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=272274
Bug ID: 272274
Summary: RegExp.prototype[Symbol.matchAll] doesn't respect `v`
flag
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aosukeke at gmail.com
poc:
```js
function doMatchAll(regex) {
const text = 'a';
const matches = [...RegExp.prototype[Symbol.matchAll].call(regex, text)];
print(matches.map(match => match.index));
}
doMatchAll(/(?:)/g);
// expected: 0,1,2,3,4,5
// actual : 0,1,2,3,4,5
doMatchAll(/(?:)/gu); // 0,2,3,5
// expected: 0,2,3,5
// actual : 0,2,3,5
doMatchAll(/(?:)/gv); // 0,1,2,3,4,5
// expected: 0,2,3,5
// actual : 0,1,2,3,4,5
```
--
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/20240406/0881c722/attachment.htm>
More information about the webkit-unassigned
mailing list