# coding=utf-8import re# 匹配两个字符中间的所有字符a ='life is short, i use pythoni love it'r = re.findall(r'life(.*?)it',a)print(r)