import re
phone = str(input('请输入手机号:'))
# b = str(12345678912)
t = re.compile(r'^1(3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8[0-9]|9[0-9])\d{8}$')
s = re.search(t,phone)
# print(s)
if s:
print(s.group(),'是正常手机号')
else:
print('手机号格式不正确')

python 正则匹配手机号

 


 
                    
            
                

相关文章:

  • 2022-01-09
  • 2021-08-12
  • 2021-07-30
  • 2022-12-23
  • 2021-11-29
  • 2021-12-18
  • 2021-08-19
  • 2021-12-06
猜你喜欢
  • 2021-10-27
  • 2021-10-03
  • 2021-11-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案