|
Download Fore_End/cpcn2/node_modules/escape-string-regexp/readme.md from zxy0307/JavaWeb: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/escape-string-regexp/readme.md
- Command line
-
hf download hf://zxy0307/JavaWeb/Fore_End/cpcn2/node_modules/escape-string-regexp/readme.md
-
curl -L -o readme.md https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/escape-string-regexp/readme.md
552 Bytes
escape-string-regexp
Escape RegExp special characters
Install
$ npm install --save escape-string-regexp
Usage
const escapeStringRegexp = require('escape-string-regexp');
const escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> 'how much \$ for a unicorn\?'
new RegExp(escapedString);
License
MIT © Sindre Sorhus