python 如何判断string中包含“姓名 手机号”这样的行?
巴扎黑
巴扎黑 2017-04-18 09:06:26
0
3
603

python 如何判断string中包含 姓名 手机号 这样的行?

例如, 判断 string 中是否包含:

张三 13912345678王麻子 15925469873迈克尔杰克逊 13802157869

请赐教,万分感谢!

巴扎黑
巴扎黑

reply all(3)
洪涛

You can use regular expressions for mobile phone numbers, but it’s hard to judge the name.

迷茫

Mobile phone numbers are regular and can be matched. If you search many
names on Baidu, import a Baijia surname or collect all the surnames, and then enter them into a list. When judging, judge whether the name contains a Baijia surname. , included, is the name...

I have used this method to distinguish regions...

PHPzhong

Let’s judge by the regular expression of spaces plus numbers

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!