擅长:python、mysql、java
<p>使用<strong><a href="https://docs.python.org/2/library/re.html#re.findall" rel="nofollow">re.findall()</a></strong></p>
<pre><code>import re
data = '(3,1)-[(7,2),1,(a,b)]-8a'
found = re.findall('(\(\w,\w\))', data)
print found
</code></pre>
<p>输出:</p>
<pre><code>['(3,1)', '(7,2)', '(a,b)']
</code></pre>