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

import re

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

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

Published by

风君子

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