我正在尝试使用Python提取包含特定字符串的段落。示例: text = """test textract.
test word.
re.findall(r'(?<=(\n)).*?'+ myword + r'+.*?(?,下面的方法都不起作用: re.findall(r'(?<=(\.\n)).*?
我可以让它打印出网站的所有内容,但regex或其他东西不起作用。我使用当前代码获得的输出仅为[]。所以我想知道我做错了什么?Python文件:import re
htmltext=htmlfile.read()pattern=re.compile(regex)
price=re.findall(pattern,ht