regexp: fix non greedy quantizers with zero length matches

This commit is contained in:
Fabrice Bellard
2024-05-30 16:41:37 +02:00
parent d86aaf0b8f
commit 36911f0d3a
2 changed files with 8 additions and 8 deletions

View File

@@ -678,6 +678,8 @@ function test_regexp()
assert(a, ["a", undefined]);
a = /(?:|[\w])+([0-9])/.exec("123a23");
assert(a, ["123a23", "3"]);
a = /()*?a/.exec(",");
assert(a, null);
}
function test_symbol()