Disallow Controls Characters in Regular Expressions (no-control-regex)
This rule is aimed at ensuring all regular expressions don’t use control characters.
The following patterns are considered warnings:
var pattern1 = /\\x1f/; var pattern2 = new RegExp("\x1f");
The following patterns do not cause a warning:
var pattern1 = /\\x20/; var pattern2 = new RegExp("\x20");
When Not To Use It
If you need to use control character pattern matching, then you should turn this rule off.
This rule was introduced in ESLint 0.1.0.