fqdn

Validate a hostname string

Validate a hostname string Question: Following up to Regular expression to match hostname or IP Address? and using Restrictions on valid host names as a reference, what is the most readable, concise way to match/validate a hostname/fqdn (fully qualified domain name) in Python? I’ve answered with my attempt below, improvements welcome. Asked By: kostmo || …

Total answers: 10