Test, validate and match regular expressions
This regex matches Fully Qualified Domain Names (FQDNs) with support for internationalized domain names using Punycode (xn-- prefix). It validates that each label starts and ends with alphanumeric characters, allows hyphens in the middle, and requires the TLD to be either alphabetic or Punycode-encoded. The optional trailing dot follows FQDN specifications. Common use cases include validating hostnames, domain inputs in forms, and network configuration parameters.