mirror of
https://github.com/RGBCube/serenity
synced 2025-05-27 20:45:08 +00:00
![]() By using regex::AllFlags::SkipTrimEmptyMatches we get a null string for unmatched capture groups, which we then turn into an undefined entry in the result array instead of putting all matches first and appending undefined for the remaining number of capture groups - e.g. for /foo(ba((r)|(z)))/.exec("foobaz") we now return ["foobaz", "baz", "z", undefined, "z"] and not [ ["foobaz", "baz", "z", "z", undefined] Fixes part of #6042. Also happens to fix selecting an element by ID using jQuery's $("#foo"). |
||
---|---|---|
.. | ||
RegExp.js | ||
RegExp.prototype.exec.js | ||
RegExp.prototype.flags.js | ||
RegExp.prototype.source.js | ||
RegExp.prototype.test.js | ||
RegExp.prototype.toString.js |