title: How to find JSON object in text with python
body: <p>I'm trying to parse JSON object from text with python regex. I found this match:</p>
  
  <pre><code>'\{(?:[^{}]|(?R))*\}'
  </code></pre>
  
  <p>but in python I get this error:</p>
  
  <pre><code>re.error: unknown extension ?R at position 12
  </code></pre>
  
  <p>See the regex match in <a href="https://regex101.com/r/yZ9fO6/1" rel="nofollow noreferrer">this regex101 example</a>.</p>