[Tutor] regex advise + email validate
Norman Khine
norman at khine.net
Fri Oct 1 13:34:01 CEST 2010
hello, i have this code
http://pastie.org/1193091
i would like to extend this so that it validates TLD's such as .travel
and .museum, i can do this by changing {2,4} to {2,7} but this sort of
defeats the purpose of validating the correct email address.
are there any python libraries available to use for this?
thanks
--
˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ
ǝq s,ʇǝן ʇǝʎ
%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
More information about the Tutor
mailing list