User Tools

Site Tools


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: 2017/08/10 10:59 (external edit)