MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / escapeForRegex

Function escapeForRegex

tensorboard/webapp/util/string.ts:27–30  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

25 * new RegExp(E).test(V) === true.
26 */
27export function escapeForRegex(value: string): string {
28 // '$&' in a regex replacement indicates the last match.
29 return value.replace(REGEXP_ESCAPE_CHARS, '\\$&');
30}
31
32/**
33 * Processes text from left-to-right, splitting it into pieces based on the

Callers 2

onCompletionAcceptedMethod · 0.90
string_test.tsFile · 0.90

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…