MCPcopy
hub / github.com/codeaashu/claude-code / escapeRegExp

Function escapeRegExp

src/utils/stringUtils.ts:9–11  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

7 * pattern in a RegExp constructor.
8 */
9export function escapeRegExp(str: string): string {
10 return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
11}
12
13/**
14 * Uppercases the first character of a string, leaving the rest unchanged.

Callers 3

compileTermPatternsFunction · 0.85
extractTagFunction · 0.85
getUniqueForkNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected