Build, test, and debug regular expressions
This regex validates and extracts HTTP or HTTPS origin URLs (scheme and hostname only). It ensures the protocol is followed by a valid domain name with at least two dot-separated labels (e.g., domain.com), supporting subdomains. It strictly excludes paths, queries, fragments, or ports, matching the whole line.