MCPcopy Create free account
hub / github.com/UNLINEARITY/Obsidian-CodeSpace / escapeRegex

Method escapeRegex

src/code_view.ts:349–351  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

347 }
348
349 private escapeRegex(text: string): string {
350 return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
351 }
352
353 private replace() {
354 const query = this.getQuery();

Callers 3

findNextMethod · 0.95
findPreviousMethod · 0.95
replaceAllMethod · 0.95

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected