Test, validate and match regular expressions
This regular expression matches a Fully Qualified Domain Name (FQDN) that is strictly between 1 and 22 characters in total length. It validates individual domain labels containing lowercase alphanumeric characters and hyphens, explicitly supports Punycode internationalized domain names (xn--), and ensures the top-level domain consists only of 2 to 63 letters. It is ideal for validating short hostnames or restricted domain name inputs in web forms.