QT Regular Expression getting contents between brackets
<p>I want to split an expression getting the contents between brackets:</p>

<p>eg. An expression could look like this:</p>

<pre><code>    (center:SCREEN)-(25%:SCREEN_WIDTH)
</code></pre>

<p>So far my code looks like this:</p>

<pre><code>    QStringList lstTerms = strProcessed.split("/\(([^)]+)\)/")
</code></pre>

<p>But this only returns:</p>

<pre><code>    (center:SCREEN)-(25%:SCREEN_WIDTH)
</code></pre>

<p>What I want is the array to contain two element, in the case of the example above:</p>

<pre><code>    [0] center:SCREEN
    [1] 25%:SCREEN_WIDTH
</code></pre>

<p>Thank you @noob, final routine:</p>

<pre><code>QRegularExpression regex("(?&lt;=\\()[^)]*(?=\\))");
QRegularExpressionMatchIterator matches = regex.globalMatch(strProcessed);
QStringList slstTerms;

while( matches.hasNext() ) {
    QRegularExpressionMatch match = matches.next();

    if (match.hasMatch()) {
        slstTerms.append(match.captured(0));
    }
}
</code></pre>