Test, validate and match regular expressions
Matches any line containing a URI with a query string, capturing everything before the '?' in a named group 'm'. The optional (?:.*)? consumes the rest of the query string, so the full match includes it while group 'm' isolates the clean URI path. Commonly used for parsing web server access logs and extracting request URIs without their query parameters. The gm flags allow matching each line independently in multiline text.