Build, test, and debug regular expressions
This regex extracts components from domain names, capturing the subdomain prefix (if present) and separating the main domain name from its top-level domain (TLD). It handles both standard TLDs like .com and country-specific second-level domains like .co.uk. Useful for DNS record processing, URL parsing, or domain analysis tasks where you need to identify different domain components.