I have a little knowledge about RegEx, but at the moment, it is far above of my abilities.
I'm needing help to find the text before the last open-parenthesis that doesn't have a matching close-parenthesis.
(It is for CallTip of a open source software in development.)
Below some examples:
--------------------------
Text               I need
--------------------------
aaa(                  aaa
aaa(x)                ''
aaa(bbb(              bbb
aaa(y=bbb(            bbb
aaa(y=bbb()           aaa
aaa(y <- bbb()        aaa
aaa(bbb(x)            aaa
aaa(bbb(ccc(          ccc
aaa(bbb(x), ccc(      ccc
aaa(bbb(x), ccc()     aaa
aaa(bbb(x), ccc())    ''
--------------------------
Is it possible to write a RegEx (PCRE) for these situations?
The best I got was \([^\(]+$ but, it is not good and it is the opposite of what I need.
Anyone can help please?
 
    
 
     
     
    