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

Function escapeForRegexp

test/angular/1.4/angular.js:774–777  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

772// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
773// Prereq: s is a string.
774var escapeForRegexp = function(s) {
775 return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
776 replace(/\x08/g, '\\x08');
777};
778
779
780/**

Callers 2

adjustMatcherFunction · 0.70
$$TestabilityProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected