title: Regex to match nested json objects
body: <p>I'm implementing some kind of parser and I need to locate and deserialize json object <strong>embedded into other semi-structured data</strong>. I used regexp:</p>
  
  <pre><code>\\{\\s*title.*?\\}
  </code></pre>
  
  <p>to locate object</p>
  
  <pre><code>{title:'Title'}
  </code></pre>
  
  <p>but it doesn't work with nested objects because expression matches only first found closing curly bracket. For</p>
  
  <pre><code>{title:'Title',{data:'Data'}}
  </code></pre>
  
  <p>it matches</p>
  
  <pre><code>{title:'Title',{data:'Data'}
  </code></pre>
  
  <p>so string becomes invalid for deserialization.
  I understand that there's a greedy business coming into account but I'm not familiar with regexps. Could you please help me to extend expression to consume all available closing curly brackets.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>To be clear, this is an attempt to extract JSON data from semi-structured data like HTML+JS with embedded JSON. I'm using GSon JAVA lib to actually parse extracted JSON.</p>