📜  re mobile no validate python 代码示例

📅  最后修改于: 2022-03-11 14:45:47.193000             🧑  作者: Mango

代码示例1
# validate either with +91 or without
s = +91 9876543210
r = re.compile("?:(\+91\s)?([6-9][0-9]{9})$")
m = re.search(r,s)
if m:
  print(re.group())
else:
  print("not found")