linx-simulator2/node_modules/escape-string-regexp
2019-11-22 09:43:37 +00:00
..
index.js Simulator first commit 2019-09-18 11:11:16 +03:00
license Simulator first commit 2019-09-18 11:11:16 +03:00
package.json Added custom log name 2019-11-22 09:43:37 +00:00
readme.md Simulator first commit 2019-09-18 11:11:16 +03: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