rDrama/node_modules/escape-string-regexp
Aevann1 67a1595b9b fdsfd 2021-12-13 22:28:32 +00:00
..
index.js fdsfd 2021-12-13 22:28:32 +00:00
license fdsfd 2021-12-13 22:28:32 +00:00
package.json fdsfd 2021-12-13 22:28:32 +00:00
readme.md fdsfd 2021-12-13 22:28:32 +00: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