title: Python: How to match nested parentheses with regex?
body: <p>I'm trying to match a mathematical-expression-like string, that have nested parentheses.</p>
  
  <pre><code>import re
  
  p = re.compile('\(.+\)')
  str = '(((1+0)+1)+1)'
  print p.findall(s)
  </code></pre>
  
  <blockquote>
    <p>['(((1+0)+1)+1)']</p>
  </blockquote>
  
  <p>I wanted it to match all the enclosed expressions, such as (1+0), ((1+0)+1)...<br>
  I don't even care if it matches unwanted ones like (((1+0), I can take care of those.</p>
  
  <p>Why it's not doing that already, and how can I do it?</p>