Test, validate and match regular expressions
This PCRE regex parses DNS zone file records with detailed named capture groups for domain name, TTL, class, and type. For SOA records, it captures all seven fields (mname, rname, serial, refresh, retry, expire, minimum) using a conditional pattern, while other record types capture rdata in a single group. The extended mode (x) allows for readable formatting with whitespace.