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