查找正则表达式
import rere_txt = re.compile(r'(\d)*.txt')m = re_txt.search(src)if not m == None: m.group(0) #complete str m.group(1) # first group string
匹配正则表达式
if re.match(r'(\d)*.txt',path): print("match")else: print("not match")
分割正则表达式
list = re.split(r'\d',string)
替换正则表达式
re.sub(r'\d*',rep,src)