I'm trying to find a RegEx pattern that lets me match on all parentheses (and their content) as long as these parentheses are between { and }.
Examples:
{foo (i,j) bar}should match on(i,j){(i,j) foo (k,l) bar (m,n,o)}should match on(i,j),(k,l), and(m,n,o).foo (i,j) barshould not match on anything because the string is not between swirly brackets.{foo (i,j) bar} (k,l)should match on(i,j)but not(k,l)because the latter is outside of the swirly brackets.
The closest I came was with this pattern: (?<=\{)[^\(].*\(.*?\).*(?=\}). This pattern matched on the first, second, and fourth example, but matched on all of the content between the swirly brackets instead of only the parentheses and their content.