In htaccess, the backlash (\) is used in writing control characters such as line feed that cannot be entered directly via the keyboard. Javascript uses the same definitions listed in the Table below.
\ | Backslash - Used in defining escape characters |
\\ | Backslash |
\f | Form feed |
\n | New line |
\r | Carriage return |
\s | Any white space including space, tab, form-feed, line feed. |
\t | Tab character |
\' | Single quote |
\" | Double quote |
\xhh | hh marks two hexadecimal digits |
The following characters have special meaning within a regular expression.
. ^ $ * + - ? ( ) [ ] { } \ | — /
To reference the literal character, it must be "escaped" within the regular expression