The string may look 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 "a (x, y)". How can I do this with Regex? Here is what I have:
\\w\\(((?:\\([a-zA-Z0-9]+\\))|(?:[a-zA-Z0-9]+)),((?:\\([a-zA-Z0-9]+\\))|(?:[a-zA-Z0-9]+))\\)
It corresponds to only two recursions of "a (x, y)".
source share