I have a target string like this: (however nesting can be very deep in practice)
{hi {how {are {you}}}}
Desired result would be:
Groups:
hi
how
are
you
I can't find anything in c# regex to do nested capturing like that. Is it possible at all?
EDIT:
I think I simplified my example too much which obscures the answers.
I need to capture in a recursive sort of way because I need the content inside the brackets:
{test[{test2[content]}]}
where the desired result would be:
{test2[content]}
and content