MCPcopy Index your code
hub / github.com/angular/angular / escapeRegExp

Function escapeRegExp

packages/compiler/src/util.ts:42–44  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

40
41// Escape characters that have a special meaning in Regular Expressions
42export function escapeRegExp(s: string): string {
43 return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
44}
45
46export type Byte = number;
47

Callers 7

util_spec.tsFile · 0.90
xliff2_spec.tsFile · 0.90
xliff_spec.tsFile · 0.90
xtb_spec.tsFile · 0.90
declareTestsFunction · 0.90
buildChunkMatcherFunction · 0.90

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…