RESOLVED FIXED 272274
RegExp.prototype[Symbol.matchAll] doesn't respect `v` flag
https://bugs.webkit.org/show_bug.cgi?id=272274
Summary RegExp.prototype[Symbol.matchAll] doesn't respect `v` flag
Sosuke Suzuki
Reported 2024-04-06 00:04:16 PDT
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 ```
Attachments
Sosuke Suzuki
Comment 1 2024-04-06 00:10:11 PDT
EWS
Comment 2 2024-04-06 07:15:42 PDT
Committed 277160@main (4b84428a9535): <https://commits.webkit.org/277160@main> Reviewed commits have been landed. Closing PR #26933 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2024-04-06 07:16:14 PDT
Note You need to log in before you can comment on or make changes to this bug.