Discuss / Python / 版本一的代码

版本一的代码

Topic source
import re

# 纯Email地址
regex = r'^\w+[\w+-+.]*@\w+.com$'
if re.match(regex, 'someone@gmail.com'):
    print('match someone@gmail.com')
if re.match(regex, 'bill.gates@microsoft.com'):
    print('match bill.gates@microsoft.com')

  • 1

Reply