Last Updated: February 25, 2016
·
220
· gifthlong

Sanitize input to be treated as a literal

dirtystring.replace(/([.*+?^${}()|[]\/\])/g, "\$1");