I’d like to match a pattern occurring within an arbitrary nesting of delimiter pairs (in my case, braces/curly brackets). For example, if the pattern was “abc”, I’d like to match any of the following:
{ abc}
{ abc { zod } }
{ bar { {abc} foo } }
{ bar { {} foo} abc }
I’ve been trying GNU grep and pcregrep, but would be happy to use any linux command line tool.