it/itf/festival/utils.py

9 lines
180 B
Python
Raw Normal View History

2010-03-03 14:28:00 +00:00
import re
def validateEmail(email):
if len(email) > 7:
if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", email) != None:
return 1
return 0