Test, validate and match regular expressions
Matches JavaScript assignments to window.location.href where a quoted URL string is assigned, capturing the URL in a group. Commonly used for extracting redirect targets from scraped web pages, analyzing navigation logic in JS code, or detecting potential open redirect vulnerabilities. The gm flags ensure all occurrences are found across multiple lines.