python正则使用

# encoding:utf-8
import re
mystr ="""
    1123个职位满足条件
"""
restr = "(\\d+)"
regex = re.compile(restr,re.IGNORECASE)
mylist = regex.findall(mystr)
print(mylist)
print(mylist[0])

你可能感兴趣的:(python正则使用)