STL icon indicating copy to clipboard operation
STL copied to clipboard

`<regex>`: Backslashes in character classes are sometimes not matched in basic regular expressions

Open muellerj2 opened this issue 9 months ago • 0 comments

The basic regular expressions [\(], [\)], [\{] and [\}] do not match the backslash, even though all of them should. The lexer internally recognizes and handles these "escaped" parentheses and braces as the opening and closing parentheses of capture groups or braces of quantifiers, even though there are no capture groups or quantifiers within character classes.

Noticed while writing test coverage for closely related #5244.

muellerj2 avatar Mar 29 '25 21:03 muellerj2