Email Validation with domain

Sallu praveen.sunsetpoint at
Wed Jul 2 13:41:08 CEST 2008

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'
                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

More information about the Python-list mailing list