escape-string-regexp 1.0.3

Escape RegExp special characters

Homepage: https://github.com/sindresorhus/escape-string-regexp

Platform: npm

Language: JavaScript

License: MIT

View on registry: https://www.npmjs.com/package/escape-string-regexp/

Install: npm install escape-string-regexp


escape-string-regexp Build Status

Escape RegExp special characters

Install

$ npm install --save escape-string-regexp

Usage

var escapeStringRegexp = require('escape-string-regexp');
var escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> how much \$ for a unicorn\?
new RegExp(escapedString);

License

MIT © Sindre Sorhus

веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей

GitHub Repository

sindresorhus/escape-string-regexp sindresorhus/escape-string-regexp

Escape RegExp special characters

Language: JavaScript

Created: June 24, 2014 15:04

Last updated: March 09, 2015 21:33

Last pushed: February 22, 2015 09:22

Size: 152 KB

Stars: 24

Forks: 4

Watchers: 4

Open issues: 0

Top Contributors

Joshua Appelman Sindre Sorhus

Releases

  • 1.0.3 - February 22, 2015 09:22
  • 1.0.2 - September 13, 2014 15:50
  • 1.0.1 - July 12, 2014 00:34
  • 1.0.0 - June 24, 2014 15:06

Related Projects

escape-string-regexp
Escape RegExp special characters
Bower - JavaScript - MIT - Published about 1 month ago - 24 stars
bloody-escapehtml 1.1.0
escape HTML special chars
npm - JavaScript - MIT - Updated 8 months ago
clone-regexp 1.0.0
Clone and modify a RegExp instance
npm - JavaScript - MIT - Updated 8 months ago - 11 stars
escape-latex 0.1.2
Escape LaTeX special characters with Javascript
npm - JavaScript - MIT - Updated over 2 years ago - 2 stars
escape-regex-string 1.0.3
An extremely simple module to escape a string literal in preparation for passing to the RegExp co...
npm - JavaScript - MIT - Updated 2 months ago - 1 stars
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей