Skip to content

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

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!regexmeow is a substring of homeowner

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions