r3-v2/node_modules/escape-string-regexp
Theunis J. Botha 5f5bbac56e initial comit 2020-02-27 15:24:35 +01:00
..
index.js initial comit 2020-02-27 15:24:35 +01:00
license initial comit 2020-02-27 15:24:35 +01:00
package.json initial comit 2020-02-27 15:24:35 +01:00
readme.md initial comit 2020-02-27 15:24:35 +01: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