<p>我不熟悉python中的正则表达式。
假设我有这个字符串:</p>
<pre><code>Blood and Sweat and Tears
</code></pre>
<p>如何捕获<code>Blood and Sweat</code>和<code>Sweat and Tears</code>?你知道吗</p>
<p>我试过以下方法,但没有成功。你知道吗</p>
<pre><code>>>> import re
>>> s = 'Blood and Sweat and Tears'
>>> re.findall('\w+\sand\s\w+', s)
['Blood and Sweat']
>>> re.findall('\w+\sand\s\w+\Z', s)
['Sweat and Tears']
</code></pre>