I need to create a REGEX that will capture the last expression of the 'if' clause.
For example, given the following statement:
if ( if( (1+1 == 2, 1, 2)), 3);
I want to match:
((1+1 == 2, 1, 2))
I tried this, but it does not work:
if\(\.*^(?!if)\)