手机正则表达式

import re

#首先 1开头,11位数就ok   

简洁版本

# f1 = 13334564611

# s1 = re.findall('1d{10}','13334564611')

# print(s1)

# 13 14 15  开头

f1 = '13334564611'

s1 = re.findall('^1[3|4|5]d{8}',f1)

print(s1)

原文地址:https://www.cnblogs.com/liu--huan/p/9497776.html