title: Regex: How to capture groups of parentheses if followed by a set of operators?
body: <pre><code>\(([^\\(\\)]+)\)
  </code></pre>
  
  <p>My regex above captures everything between each set of brackets of the form </p>
  
  <pre><code>(Hello OR there) AND (big AND wide AND world)
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>Hello OR there
  big AND wide AND world
  </code></pre>
  
  <p>But it falls down when there are parentheses inside the terms within the brackets</p>
  
  <pre><code>(Hello OR there AND messing(it)up) AND (big AND wide AND world)
  </code></pre>
  
  <p>Returns</p>
  
  <pre><code>it
  big AND wide AND world
  </code></pre>
  
  <p>Whereas I want </p>
  
  <pre><code>Hello OR there AND messing(it)up
  big AND wide AND world
  </code></pre>
  
  <p>I'm not sure if that's possible with regex or what the best approach would be?</p>