Build, test, and debug regular expressions
This regular expression is designed to match and extract components from HTTP or HTTPS URLs. It successfully captures the protocol, host (which can be either an IPv6 address enclosed in brackets or a standard domain name), optional port number, and the file path. This pattern is highly useful for parsing web addresses in log files, validating URL formats, or extracting routing information in network applications.