biobulkbende.org/node_modules/escape-string-regexp
Tancre 0efda7fffe structure, layout and automation 2020-09-16 14:23:28 +02:00
..
index.js structure, layout and automation 2020-09-16 14:23:28 +02:00
license structure, layout and automation 2020-09-16 14:23:28 +02:00
package.json structure, layout and automation 2020-09-16 14:23:28 +02:00
readme.md structure, layout and automation 2020-09-16 14:23:28 +02: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