MCPcopy Create free account
hub / github.com/csev/py4e / unescapeFormat

Function unescapeFormat

code/gmane/Chart.bundle.js:2144–2148  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

2142
2143 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
2144 function unescapeFormat(s) {
2145 return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
2146 return p1 || p2 || p3 || p4;
2147 }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
2148 }
2149
2150 var tokens = {};
2151

Callers 1

getParseRegexForTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected