MCPcopy Index your code
hub / github.com/angular-ui/ui-router / escapeForRegexp

Function escapeForRegexp

test/angular/1.3/angular.js:671–674  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

669// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
670// Prereq: s is a string.
671var escapeForRegexp = function(s) {
672 return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
673 replace(/\x08/g, '\\x08');
674};
675
676
677/**

Callers 2

adjustMatcherFunction · 0.70
$$TestabilityProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected