Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Path To Regexp | 7,619 | 534,174 | 5,882 | 2 months ago | 53 | May 06, 2022 | 20 | mit | TypeScript | |
Turn a path string such as `/user/:name` into a regular expression | ||||||||||
Super Expressive | 4,474 | 4 months ago | 10 | mit | JavaScript | |||||
🦜 Super Expressive is a zero-dependency JavaScript library for building regular expressions in (almost) natural language | ||||||||||
Randexp.js | 1,769 | 19,706 | 389 | 6 months ago | 20 | July 21, 2018 | 11 | mit | JavaScript | |
Create random strings that match a given regular expression. | ||||||||||
Frak | 1,056 | 4 years ago | 9 | February 09, 2020 | 1 | Clojure | ||||
Transform collections of strings into regular expressions. | ||||||||||
Tiny Regex C | 1,005 | 9 months ago | 32 | unlicense | C | |||||
Small portable regex in C | ||||||||||
Regexp Examples | 483 | 62 | 15 | 3 years ago | 42 | January 09, 2020 | 8 | mit | Ruby | |
Generate strings that match a given regular expression | ||||||||||
Re Build | 472 | 6 years ago | 2 | July 25, 2016 | mit | JavaScript | ||||
Building regular expressions with natural language | ||||||||||
Escape String Regexp | 436 | 773,946 | 2,432 | 2 years ago | 10 | April 17, 2021 | 1 | mit | JavaScript | |
Escape RegExp special characters | ||||||||||
Teip | 432 | 7 months ago | 6 | April 28, 2022 | 4 | mit | Rust | |||
Masking tape to help commands "do one thing well" | ||||||||||
Node Re2 | 428 | 40 | 55 | a month ago | 52 | June 12, 2022 | 3 | other | JavaScript | |
node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines. |
Escape RegExp special characters
$ npm install escape-string-regexp
import escapeStringRegexp from 'escape-string-regexp';
const escapedString = escapeStringRegexp('How much $ for a ?');
//=> 'How much \\$ for a \\?'
new RegExp(escapedString);
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.