$ npm install regexp-special-chars
Special RegExp characters, useful for escaping.
Install with npm:
npm i regexp-special-chars --save-dev
var reChars = require('regexp-special-chars');
var esc = function(str) {
return str.replace(reChars, '\\$&');
};
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on June 30, 2014.