陈鹏铭 0e441ebeb1 仓库创建 1 éve%!(EXTRA string=óta)
..
index.js 0e441ebeb1 仓库创建 1 éve%!(EXTRA string=óta)
license 0e441ebeb1 仓库创建 1 éve%!(EXTRA string=óta)
package.json 0e441ebeb1 仓库创建 1 éve%!(EXTRA string=óta)
readme.md 0e441ebeb1 仓库创建 1 éve%!(EXTRA string=óta)

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