The string can be like one of the following:
a(b,c) a(a(b,c),d) a(a(a(a(a(b,c),d),a(e,f)),g),h) etc
I want to match an unlimited number of
2 options - 1) Use Lexical Analysis to do the pattern matching & replacement on your own [OR] 2) If you want to stick to Regex then use some shell programming (or any supporting language) & call it from Java.