MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / escapeForRegexp

Function escapeForRegexp

code/songhop/www/lib/angular/angular.js:655–658  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

653// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
654// Prereq: s is a string.
655var escapeForRegexp = function(s) {
656 return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
657 replace(/\x08/g, '\\x08');
658};
659
660
661/**

Callers 2

adjustMatcherFunction · 0.70
$$TestabilityProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected