擅长:python、mysql、java
<p>虽然我同意您不应该使用regexp来解析html,但有时也可以。在本例中,我看到了某种模式,但我不太确定您想从html中提取什么。我会重写你的regexp,希望它就是你想要的:</p>
<pre><code>temp=re.findall(r"<li>(\d{4}-\d{2}-\d{2} {\d:]{8}).* - (.*) - GET (.*)<\/li>",html)
for i in temp:
print i
</code></pre>
<p>temp将包含包含此数据的元组(日期、域、路径)</p>