Every line of 'what does the following regex match https //.+' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
58 function make_regexp(url) { 59 var re = ""; 60 const special_chars = "\\^$*+?.()|{}[]"; 61 for(var i = 0;i
129 function matchDomain(domain) 130 { 131 if (!domain) 132 return "^https?://"; 133 134 return "^https?://([^/:]*\\.)?" + escapeRegExp(domain).toLowerCase() + "[/:]"; 135 }
80 value: function match(url) { 81 return (/\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url) 82 ); 83 }
7 export function toMatchUrl(pattern) { 8 if (pattern === '') { 9 return '*://*/*'; 10 } 11 if (pattern.indexOf('://') === -1) { 12 pattern = '*://' + pattern; 13 } 14 if (!hasPathSlash.test(pattern)) { 15 pattern = pattern + '/'; 16 } 17 if (pattern.indexOf('*') === -1) { 18 pattern = pattern + '*'; 19 } 20 return pattern; 21 }
2 function matches(url, matcher) { 3 if (!matcherCache[matcher]) { 4 matcherCache[matcher] = new RegExp(matcher); 5 } 6 return matcherCache[matcher].test(url); 7 }