正则表达式验证手机号码格式_正则表达式身份证校验

import re

patt=r’(13[4-9]\d{8,})KaTeX parse error: Undefined control sequence: \d at position 12: |(15[01289]\̲d̲{8,})
mobile=str(input(‘请输入手机号码:’))

match=re.match(patt,mobile)
if match==None:
print(mobile,“不是有效的中国移动手机号码。”)
else:
print(mobile,“是有效的中国移动手机号码。”)
在这里插入图片描述在这里插入图片描述

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

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