general:regex:hostname

FQDN RegEx

Valid as per RFC 1123. Originally, RFC 952 specified that hostname segments could not start with a digit.

^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\.$
  • general/regex/hostname.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1