validate hostname in Python

Posted by kostmo on Stack Overflow See other posts from Stack Overflow or by kostmo
Published on 2010-03-28T05:58:52Z Indexed on 2010/03/28 6:03 UTC
Read the original article Hit count: 399

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about python

Related posts about hostname