Escapes a regular expression given as string by escaping all special regular expression characters.
The text to escape
Whether to allow and keep unescaped tokens like \s, \t, or \n
\s
\t
\n
The escaped text
Escapes a regular expression given as string by escaping all special regular expression characters.