regexp-special-chars
Special RegExp characters, useful for escaping.
Last updated 12 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install regexp-special-chars 
SYNC missed versions from official npm registry.

regexp-special-chars NPM version

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.

Current Tags

  • 0.1.0                                ...           latest (12 years ago)

1 Versions

  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE