python 正則表達式推断邮箱格式是否正确

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

原文地址:https://www.cnblogs.com/lxjshuju/p/6839129.html