import re tel = '13119657713' # ret = re.match(r"1[35678]\d{9}", tel) # 由于手机号位数大于11位也能匹配成功,所以修改如下: ret = re.match(r"^1[35678]\d{9}$", tel)