python中用正则表达式检测邮件是否合法

import re


r = r'^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$'


m= re.match(r,'[email protected]')
if m:
    print m.group()


你可能感兴趣的:(正则表达式,python)