MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / escapeForRegexp

Function escapeForRegexp

lib/test/angular/1.4.3/angular.js:753–756  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

751// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
752// Prereq: s is a string.
753var escapeForRegexp = function(s) {
754 return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
755 replace(/\x08/g, '\\x08');
756};
757
758
759/**

Callers 2

adjustMatcherFunction · 0.70
$$TestabilityProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected