is there a way to match open and close parentheses? since i am working under bash, it seems that i cannot use local variables and recursive matching.
e.g.
(((((123))))) # shall be matched
((123) # shall not.
edit: the scenario is a little bit different bacause all the parentheses are consecutive