Files
ladybird/Libraries/LibRegex
aplefull 292c0cc486 LibRegex: Detect overlapping character classes and ranges in optimizer
`range_contains()` checked if an lhs_range was contained within the
query range, rather than checking for overlap. This caused patterns
like `/A*[A-Z]/` to fail matching "A" because the optimizer didn't
detect that 'A' overlaps with [A-Z]. And `char_class_contains()` only
checked if two character classes were identical, not if they overlapped.
So patterns like `/\d*\w/` failed to match "1" because \d and \w were
not recognized as overlapping, even though all digits are word
characters.
2026-02-26 13:50:11 +01:00
..