Python中用正则匹配*

import re

mobile = '18312423454'

MOBILE = "^1[358]d{9}$|^147d{8}$|^179d{8}$"
p = re.compile(MOBILE)

if p.match(mobile):
print(mobile)
原文地址:https://www.cnblogs.com/qiaoer1993/p/11945233.html