I could not find similar question with what I am trying to get at.
I have a function:
Foo(int n, str b, Bar1(), Bar2(smth));
I am trying to write regex to get the following matches:
int n
str b
Bar()
Bar2(smth) // don't need recursion
I've managed to do it in 2 separate regexes:
(?<=\().*(?=\))
to get:
int n, str b, Bar1(), Bar2(smth)
then on that string, I 've used:
[^,\s*][a-zA-Z\s<>.()0-9]*
to get:
int n
str b
Bar()
Bar2(smth)
But I would really like to do it in a single regex statement, is it possible to somehow capture first regex in a group and then run second regex on that group in a single statement? I am still quite vague on using groups.