匹配两个特定字符串之间的字符

import re

string = "xxxxxxxxx entry '某某内容' for aaaaaaa"
result = re.findall(".*entry(.*)for.*",string)
for x in result:
    print x

贪婪于非贪婪

import re str = "a123b456b" 

print(re.findall(r"a(.+?)b", str)) #输出['123'] #?控制只匹配0或1个,所以只会输出和最近的b之间的匹配情况 

print(re.findall(r"a(.+)b", str)) #输出['123b456'] 

print(re.findall(r"a(.*)b", str)) #输出['123b456']