rspec/rules/S2639/description.adoc
Arseniy Zaostrovnykh 7ca29f686f Force linebreaks
2021-02-02 15:02:10 +01:00

10 lines
561 B
Plaintext

Regular expressions are powerful but tricky, and even those long used to using them can make mistakes.
The following should not be used as regular expressions:
* ``++.++`` - matches any single character. Used in ``++replaceAll++``, it matches _everything_
* ``++|++`` - normally used as an option delimiter. Used stand-alone, it matches the space between characters
* ``++File.separator++`` - matches the platform-specific file path delimiter. On Windows, this will be taken as an escape character
* ``++[]++`` - empty character class doesn't match anything