9 Apr
2003
9 Apr
'03
10:33 p.m.
On Wed, Apr 09, 2003 at 01:44:51PM -0500, Skip Montanaro wrote:
Can a top-level domain be all digits? If not, why not assume numeric if re.search(r"\.\d+$", addr) is not None?
I don't think anyone sane would create a top-level that's digits,
particularly in the range of 0 to 255. That probably means that
somebody is going to do it... ;-/
I think checking for 2 to 4 dotted octets in the range of 0 to 255
would be safest... Yes, you can probably get away with using the regex
above, but I wouldn't want to.
Sean
--
Sucking all the marrow out of life doesn't mean choking on the bone.
-- _Dead_Poet's_Society_
Sean Reifschneider, Inimitably Superfluous