1 # escape-string-regexp [](https://travis-ci.org/sindresorhus/escape-string-regexp)
3 > Escape RegExp special characters
9 $ npm install --save escape-string-regexp
16 var escapeStringRegexp = require('escape-string-regexp');
18 var escapedString = escapeStringRegexp('how much $ for a unicorn?');
19 //=> how much \$ for a unicorn\?
21 new RegExp(escapedString);
27 MIT © [Sindre Sorhus](http://sindresorhus.com)