Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url:sourceforge': 0.02; 'url:py': 0.07; 'hostname': 0.09; 'subject:string': 0.09; 'pm,': 0.10; 'wrote:': 0.14; 'defined': 0.14; 'library': 0.15; '8:40': 0.16; 'bye': 0.16; 'domain.': 0.16; 'received:mindspring.com': 0.16; 'url:markup': 0.16; 'url:revision': 0.16; 'header:In-Reply- To:1': 0.21; 'url:view': 0.23; "doesn't": 0.25; 'string': 0.26; 'script': 0.27; "i'm": 0.27; 'to:addr:python-list': 0.33; "isn't": 0.33; 'there': 0.35; 'received:24': 0.35; 'determine': 0.36; 'charset:us-ascii': 0.36; 'hello,': 0.38; 'domain': 0.38; 'eric': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'add': 0.39; 'to:addr:python.org': 0.39; 'header:Message-Id:1': 0.62; 'url:net': 0.63; 'here': 0.66; 'received:69.73': 0.84; 'url:uri': 0.84; 'well:': 0.84 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Validating string for FDQN From: Philip Semanchuk In-Reply-To: Date: Mon, 6 Jun 2011 23:10:47 -0400 Content-Transfer-Encoding: quoted-printable References: To: Lista-Comp-Lang-Python list X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - deimos.nocdirect.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - semanchuk.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307419368 news.xs4all.nl 49183 [::ffff:82.94.164.166]:58933 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7134 On Jun 6, 2011, at 8:40 PM, Eric wrote: > Hello, >=20 > 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=3D1.= 1&view=3Dmarkup bye Philip=