Test, validate and match regular expressions
This regex extracts the subdomain (or hostname) and the parent domain from a fully qualified domain name (FQDN). It captures the leftmost part into a 'domain' group and the remainder into a 'parent' group. It is particularly useful for DNS log parsing, URL routing, or any task requiring the segmentation of domain components.