title: Extract Python dictionary from string
body: <p>I have a string with valid python dictionary inside</p>
  
  <pre><code>data = "Some string created {'Foo': u'1002803', 'Bar': 'value'} string continue etc."
  </code></pre>
  
  <p>I need to extract that dict. I tried with regex but for some reason <code>re.search(r"\{(.*?)\}", data)</code> did not work. Is there any better way extract this dict?</p>