标签:search imp port strong hone 字符 span python 创建
在python中使用正则表达式有几个步骤,下面对这些步骤做一下说明:
代码如这样:
import re phoneNumber = re.compile(r‘\d\d\d-\d\d\d-\d\d\d\d‘) mo = phoneNumber.search(‘My number is 415-333-3432‘) print(‘Phone number found:‘+mo.group())
标签:search imp port strong hone 字符 span python 创建
原文地址:http://www.cnblogs.com/xuexiaohun/p/6527225.html