I am looking for a regular expression (**) that will match an unknown number of nested functions. So
expression function(expression) function(function(expression)) function(function(function(expression))) etc.
everything will fit. But, for example, if I add an extra closing bracket to the end, it will not be included in the match.
(**) Please do not answer that it would be easier to do this by playing (and counting the brackets) rather than using a regular expression - after I scratched my head a bit, I already know that!
source share