python正则表达式03--字符串中匹配数字

import re

# \d+ 匹配字符串中的数字部分,返回列表

ss = 'adafasw12314egrdf5236qew'
num = re.findall('\d+',ss)
print(num)
#运行结果
#['12314', '5236']

\d+使用匹配数字

posted @ 2018-05-22 19:32  了解2号  阅读(35278)  评论(0编辑  收藏  举报