List of all characters that should be escaped before put in to RegEx?

Take a look at PHP.JS’s implementation of PHP’s preg_quote function, that should do what you need:

http://phpjs.org/functions/preg_quote:491

The special regular expression characters are: . \ + * ? [ ^ ] $ ( ) { } = ! < > | : -

Leave a Comment