my-idlers/node_modules/escape-string-regexp
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00
..
index.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
license V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
package.json V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
readme.md V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00

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