tree: ddf68a5678ea23d5ec72c2e52f2872e61616717d [path history] [tgz]
  1. index.js
  2. package.json
  3. readme.md
node_modules/mocha/node_modules/escape-string-regexp/readme.md

escape-string-regexp Build Status

Escape RegExp special characters

Install

$ npm install --save escape-string-regexp

Usage

var escapeStringRegexp = require('escape-string-regexp');

var escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> how much \$ for a unicorn\?

new RegExp(escapedString);

License

MIT © Sindre Sorhus