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

Function escapeForRegexp

test/angular/1.2/angular.js:13314–13317  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

13312// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962
13313// Prereq: s is a string.
13314function escapeForRegexp(s) {
13315 return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
13316 replace(/\x08/g, '\\x08');
13317}
13318
13319
13320function adjustMatcher(matcher) {

Callers 1

adjustMatcherFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected