擅长:python、mysql、java
<p>我使用regexr得出这个(<a href="http://regexr.com/3e3go" rel="nofollow">regexr link</a>):</p>
<p><code>([\w\+]*\+[\w\+]*)(?:[^\w\+]|$)</code></p>
<p>匹配项:</p>
<p><code>fa+gw+hw+ek+ei
fasd+
fa+gq+hf+kg+is
gl+jh+ke+oj+kp
</code></p>
<p>编辑:请尝试改用re.findall,而不是使用re.search:</p>
<pre><code>>>> s = "http://hostname.com/as/ck$st=fa+gq+hf+kg+is&sadfnlslkdfn&gl+jh+ke+oj+kp sfav"
>>> re.findall("([\w\+]+\+[\w\+]*)(?:[^\w\+]|$)", s)
['fa+gq+hf+kg+is', 'gl+jh+ke+oj+kp']
</code></pre>