escapeRegExp

Escapes the RegExp special characters ^, $, \, ., *, +, ?, (, ), [, ], {, }, and | in a string.

Example