kubernetes-handbook/escape-string-regexp
Jimmy Song 1a5e3f08c0
update plugin
2022-02-22 15:54:51 +08:00
..
index.js update plugin 2022-02-22 15:54:51 +08:00
license update plugin 2022-02-22 15:54:51 +08:00
package.json update plugin 2022-02-22 15:54:51 +08:00
readme.md update plugin 2022-02-22 15:54:51 +08: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