Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BloombergGraphics/whatiscode
/ escapeRegExp
Function
escapeRegExp
scripts/glossary.js:56–58 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
54
}
55
56
function
escapeRegExp(str) {
57
return
str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
"\\$&"
);
58
}
Callers
1
highlightTerms
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected