Python 3.4 - Regular Expressions For Matching Innermost curly brackets
<p>I am trying to code a Python regular expression for matching innermost curly brackets, i.e. curly brackets which can contain any number of characters other than another pair of curly brackets. As an example, I would like the following code:</p>

<pre><code>re.findall(r'\{.*^\{.*^\}.*\}',"aaa.bbb{ccc.ddd{eee.fff}ggg.hhh}")
</code></pre>

<p>to return the following:</p>

<pre><code>['{eee.fff}']
</code></pre>

<p>but at the moment I only get a 'no match':</p>

<pre><code>[]
</code></pre>

<p>The regular expression means - well from what I understand of regular expressions so far - "match any pattern which starts with an opening curly bracket, followed by any number of characters, followed by no opening bracket, followed by any number of characters, followed by no closing brackets, followed by any number of characters, followed by a closing bracket.</p>

<p>Any idea how to improve/correct the above regular expression ?</p>