python 读取文本文件后 如何获取两个制定字符串之间的内容 最好是正则表达式 谢谢

如题所述

第1个回答  2013-05-30
import re

file = open("filename","r")
text = file.read()

content = re.findAll("first pattern.*second pattern",text)
file.close()

why not google yourself本回答被提问者采纳