# set = re.findall('\d+','你好的123iiuu')
# print(set)
#
# set = re.search('\d+','123ert321')
# print(set.group())
# ret = re.match ('\d+','你是7')
# print(ret.group())
# 字符串处理的拓展:切割 替换
# a = 'nihao| xiexie| dajia'
# set = a.split('|')
# print(set)
#
# sub 替换 谁 旧的 新的 替换次数
# a = 'nihao123dajia123hao'
# ret = re.subn('\d+','and','nihao123dajia123hao')
# print(ret)
# re 模块与进阶: 时间与空间
# compile
# ret = re.compile('\d+')
# print(ret)
# res = ret.findall('alex83taibai40egon25')
# print(res)
# res = ret.search('sjkhk172按实际花费928')
# print(res.group())
转载于:https://www.cnblogs.com/Tang854416/p/9495138.html