hz-zhhq-web/node_modules/escape-string-regexp
zzyuan 03ac614884 前端提交3 2025-02-25 13:45:28 +08:00
..
index.js 前端提交3 2025-02-25 13:45:28 +08:00
license 前端提交3 2025-02-25 13:45:28 +08:00
package.json 前端提交3 2025-02-25 13:45:28 +08:00
readme.md 前端提交3 2025-02-25 13:45:28 +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