regexp-escape
This simple module adds a RegExp.escape
function that quotes a string so that
it can be included in a regular expression as a literal match.- From: http://stackoverflow.com/a/5306111/106302
- Originally from: http://simonwillison.net/2006/Jan/20/escape/ (dead link)