You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All 4 match numbers 0 through 9 and -. It is not neccesary to escape - when it is the first or last character in the group since there is no ambiguity about it. Either the user mistyped or it is intended like this. Regardless of that, the backslash is redundant.
Describe the solution you'd like
Rubocop should register an offence for escaped hypens in character groups when the hypen is either the first or last character.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Consider the following regexes:
All 4 match numbers 0 through 9 and
-
. It is not neccesary to escape-
when it is the first or last character in the group since there is no ambiguity about it. Either the user mistyped or it is intended like this. Regardless of that, the backslash is redundant.Describe the solution you'd like
Rubocop should register an offence for escaped hypens in character groups when the hypen is either the first or last character.
The text was updated successfully, but these errors were encountered: