website/src/pages/lint/rules/noControlCharactersInRegex.md
Prevents from having control characters and some escape sequences that match control characters in regular expressions.
Control characters are hidden special characters that are numbered from 0 to 31 in the ASCII system. They're not commonly used in JavaScript text. So, if you see them in a pattern (called a regular expression), it's probably a mistake.
The following elements of regular expression patterns are considered possible errors in typing and are therefore disallowed by this rule:
\x00 to \x1F\u0000 to \u001F\u{0} to \u{1F}Control escapes such as \t and \n are allowed by this rule.
Source: https://eslint.org/docs/latest/rules/no-control-regex
var pattern1 = /\x00/;
var pattern2 = /\x0C/;
var pattern3 = /\x1F/;
var pattern4 = /\u000C/;
var pattern5 = /\u{C}/u;
var pattern7 = new RegExp("\x0C");
var pattern7 = new RegExp("\\x0C");
var pattern1 = /\x20/;
var pattern2 = /\u0020/;
var pattern3 = /\u{20}/u;
var pattern4 = /\t/;
var pattern5 = /\n/;
var pattern6 = new RegExp("\x20");