PIbd-22.-Stroev-V.M.-Intern.../Lab2/node_modules/escape-string-regexp
2023-10-28 00:49:09 +03:00
..
index.js Lab2 2023-10-28 00:49:09 +03:00
license Lab2 2023-10-28 00:49:09 +03:00
package.json Lab2 2023-10-28 00:49:09 +03:00
readme.md Lab2 2023-10-28 00:49:09 +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