Email Validation with domain
- From: Sallu <praveen.sunsetpoint@xxxxxxxxx>
- Date: Wed, 2 Jul 2008 04:41:08 -0700 (PDT)
Hi All, import re
msg=raw_input('Enter the email : ')
def validateEmail(email):
#if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]
{1,3})(\\]?)$", email) != None:
if re.match("^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$",
email) != None:
print 'Valis'
else:
print 'not'
validateEmail(msg) i wrote a script above it works fine but it does
not check for valid domain like .com .org .in
how to validate with domain
.
- Follow-Ups:
- Re: Email Validation with domain
- From: Ben Finney
- Re: Email Validation with domain
- From: oj
- Re: Email Validation with domain
- Prev by Date: Re: Scripting SAP GUI (Windows)
- Next by Date: Re: How to pickle bound methods
- Previous by thread: Scripting SAP GUI (Windows)
- Next by thread: Re: Email Validation with domain
- Index(es):