在python中使用正则表达式查找有效的电话号码phn1='412-1114-1234' if re.search("\d{3}-\d{3}-\d{4}",phn1): print('It is a phone number') else: ...2024-06-02 已阅读: n次