Python 手机号正则匹配
# -*- coding:utf-8 -*- import re def is_phone(phone): phone_pat = re.compile('^(13\d|14[5|7]|15\d|166|17[3|6|7]|18\d)\d{8}$') res = re.search(phone_pat, phone) if not res: return False return True