5F90A1AAAC9D210091E06F2D89A480EF.jpg

表达式:

//包含大小写字母,下划线,阿拉伯数字,点号,中划线
[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)

使用:

import re
pattern = re.compile(r"[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)")

strs = '123@@345.com test@test.com sdfs_sf@@@_123   '
result = pattern.findall(strs)

print(result)

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code