Test, validate and match regular expressions
Matches URLs built from an optional protocol (e.g., http, https, ftp), an optional domain, an optional colon-prefixed port (1-5 digits), a required slash-prefixed path, and up to two optional trailing parts: a query string or an anchor/fragment. Uses .NET-style named capture groups (protocol, domain, port, path, query, anchor) for easy extraction and atomic groups to limit backtracking. With global/multiline flags, it can find URLs on each line of a larger text block.