擅长:python、mysql、java
<p>从文档中:</p>
<blockquote>
<p>"$" Matches the end of the string or just before the newline at
the end of the string.</p>
</blockquote>
<p>所以你可能想避开这条线上的美元符号,就像这样:</p>
<pre><code>start = '>\$'
</code></pre>
<p>如果您考虑将来通过HTML进行更多的搜索,我建议您看看<a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">Beautiful Soup</a>模块。它比正则表达式更宽容一点。你知道吗</p>