Files
ladybird/Tests/LibJS/Runtime/regexp-greedy-builtin-classes-ignore-case.js
Andreas Kling a03d1f8a5f LibRegex: Fix greedy \w and \W ignore-case handling
Keep the greedy built-in class fast path aligned with the regular VM
matcher for non-Unicode regexps. Without this, /\w+/i and /\W+/i
wrongly applied Unicode ignore-case behavior in the optimized loop.
2026-03-27 17:32:19 +01:00

7 lines
231 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
test("greedy \\w and \\W do not apply unicode ignore-case behavior without /u", () => {
expect(/\w/i.exec("ſ")).toBeNull();
expect(/\w+/i.exec("ſ")).toBeNull();
expect(/\W+/i.exec("a😀ſZ")[0]).toBe("😀ſ");
});