Skip to content

More on warnings for regular expressions #2151

@callmesangio

Description

@callmesangio

Hi!

As briefly discussed here:
#2053 (comment)

pre-commit could detect the [\\/] regular expression as well.
As of now (pre-commit 2.16.0), such a regex does not trigger any warnings.

Besides, IIRC, the regex [\/], currently detected, matches the single character / (not / and \), so I think it shouldn't be mentioned as an erroneous way for matching both kinds of slashes.
(see https://regex101.com/r/FRPiLZ/1)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions