selfdefined/node_modules/escape-string-regexp
tatianamac 6d5445ecc5 update
2019-11-26 14:50:43 -08:00
..
2019-11-26 14:50:43 -08:00
2019-11-26 14:50:43 -08:00
2019-11-26 14:50:43 -08:00
2019-11-26 14:50:43 -08: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