title: Extracting text between curly braces in python
body: <p>I have a string of text like following</p>
  
  <p><code>1. Foobar { abc } ( Explanation - Foo { cde } - Count - 5301435 ) 2. Foobaz { memo } ( Explanation - baz {bleh } - Count - 13946664 )</code></p>
  
  <p>And I want to extract
  <code>abc</code> and <code>memo</code> in the above string.
  I have the regex as follows [link <a href="https://pythex.org/?regex=%7B(%3F%3A%5B%5E%7B%7D%5D)*%7D&amp;test_string=1.%20Foobar%20%7B%20abc%20%7D%20(%20Explanation%20-%20Foo%7B%20cde%20%7D%20-%20Count%20-%205301435%20)%0A2.%20Foobaz%20%7B%20memo%20%7D%20(%20Explanation%20-%20baz%7Bbleh%20%7D%20-%20Count%20-%2013946664%20)&amp;ignorecase=0&amp;multiline=0&amp;dotall=0&amp;verbose=0" rel="nofollow noreferrer">here]
  </a>
  essentially <code>{(?:[^{}])*}</code>
  But it captures everything <code>(returns abc, cde, memo, bleh)</code></p>