An open API service indexing awesome lists of open source software.

https://github.com/nylen/node-regexp-escape

RegExp.escape function for quoting text for a regular expression.
https://github.com/nylen/node-regexp-escape

Last synced: 10 months ago
JSON representation

RegExp.escape function for quoting text for a regular expression.

Awesome Lists containing this project

README

          

# regexp-escape

This simple module adds a `RegExp.escape` function that quotes a string so that
it can be included in a regular expression as a literal match.

- From: http://stackoverflow.com/a/5306111/106302
- Originally from: http://simonwillison.net/2006/Jan/20/escape/ (dead link)