Many characters are reserved because have a special meaning in a regular expression, so to use one of them you need to "escape" it by placing a backslash \ right before the special character. These are:
( start of a sub-expression
) end of a sub-expression
{ start of repetition range
} end of a repetition range
[ start of a character set
] end of a character set
+ one or more repetitions
* zero or more repetitions
^ start of string
$ end of string
| "or" connection between alternatives
\ start of special code or escape
/ start or end of regexp pattern
For example a regular exprerssion to match all open square bracket is /\[/ (note the backslash). If you need to look for a backslash you must but a backslash in front of it (so doubling it).
Unfortunately there is no predefined Javascript function for "escaping" all special characters.