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])\.$
Enter your comment:
U P T K I
 
  • general/regex/hostname.txt
  • Last modified: 2019-10-31 09:05
  • (external edit)