escape-string-regexp alternatives and similar modules
Based on the "Text" category.
Alternatively, view escape-string-regexp alternatives based on common mentions on social networks and blogs.
-
i18n-node
Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates. -
StegCloak
Hide secrets with invisible characters in plain text securely using passwords ๐ง๐ปโโ๏ธโญ -
string-length
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of escape-string-regexp or a related project?
README
escape-string-regexp
Escape RegExp special characters
Install
$ npm install escape-string-regexp
Usage
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.
Get professional support for this package with a Tidelift subscription Tidelift helps make open source sustainable for maintainers while giving companiesassurances about security, maintenance, and licensing for their dependencies.