odin-default-js-exercises/node_modules/escape-string-regexp
Michael Frank d28d80c46f Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00
..
index.js remove timer and simon 2017-12-15 12:56:14 -06:00
license remove timer and simon 2017-12-15 12:56:14 -06:00
package.json Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00
readme.md remove timer and simon 2017-12-15 12:56:14 -06:00

readme.md

escape-string-regexp Build Status

Escape RegExp special characters

Install

$ npm install --save escape-string-regexp

Usage

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

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

new RegExp(escapedString);

License

MIT © Sindre Sorhus