Claude Pache (2013-08-28T16:23:41.000Z)
domenic at domenicdenicola.com (2013-08-29T23:57:44.593Z)
The complete list of characters that should be escaped is: ``` . \ + * ? [ ^ ] $ ( ) { } = ! < > | : - ``` (taken from [1]). Importantly, characters that have special meaning only in some context should also be included. For example, consider the hyphen `-`, which has special meaning only inside `[...]`: People may want to write: ``` var charList = 'abcd123-_'; var re = new RegExp( '[' + RegExp.quote(charList) + ']' ) ``` in order to construct a regexp that matches any character of `charList`. [1]: http://php.net/manual/en/function.preg-quote.php