title: JavaScript regex: Get complete JSON after (test)
body: <p>I would like to solve a problem: I got a string like this:</p>
  
  <pre><code>(test){"data":{"test1":true,"test2":0,"test3":false,"test4":"","test5":""},"testarray":[{"value":"test","alt":"test-1"}]}
  </code></pre>
  
  <p>Now I need to create a regular expression that includes the complete JSON. I started this way:</p>
  
  <p><code>/\(test\)(\{.+?\})/gi</code></p>
  
  <p><a href="https://regex101.com/r/WySywp/1" rel="nofollow noreferrer">https://regex101.com/r/WySywp/1</a></p>
  
  <p>But here I only get this result:</p>
  
  <p><code>{"data":{"test1":true,"test2":0,"test3":false,"test4":"","test5":""}</code></p>
  
  <p>What can I do to get the complete JSON?</p>