# -*- coding: cp936 -*- import re string = "xxxxxxxxxxxxxxxxxxxxxxxx entry '某某内容' for aaaaaaaaaaaaaaaaaa" result = re.findall(".*entry(.*)for.*",string) for x in result: print x # '某某内容