Validating string for FDQN

Philip Semanchuk philip at semanchuk.com
Mon Jun 6 23:10:47 EDT 2011


On Jun 6, 2011, at 8:40 PM, Eric wrote:

> Hello,
> 
> Is there a library or regex that can determine if a string is a fqdn
> (fully qualified domain name)? I'm writing a script that needs to add
> a defined domain to the end of a hostname if it isn't already a fqdn
> and doesn't contain the defined domain.

The ones here served me very well:
http://pyxml.cvs.sourceforge.net/viewvc/pyxml/xml/xml/Uri.py?revision=1.1&view=markup

bye
Philip


More information about the Python-list mailing list