1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibRegex: Parse \0 as a zero-byte instead of 0x30 ("0")

This was causing some regexes to trip up. Fixes #6202.
This commit is contained in:
Jelle Raaijmakers 2021-04-09 19:30:23 +02:00 committed by Andreas Kling
parent 2c94c9fa7f
commit db321db5f4
3 changed files with 5 additions and 18 deletions

View file

@ -538,6 +538,7 @@ TEST_CASE(ECMA262_match)
{ "^hel(?<LO>l.)1$", "hello1" },
{ "^hel(?<LO>l.)1*\\k<LO>.$", "hello1lo1" },
{ "^[-a-z1-3\\s]+$", "hell2 o1" },
{ "^[\\0-\\x1f]$", "\n" },
{ .pattern = "\\bhello\\B", .subject = "hello1", .options = ECMAScriptFlags::Global },
{ "\\b.*\\b", "hello1" },
{ "[^\\D\\S]{2}", "1 " },