If I have a string:
s = aaa{bbb}ccc{ddd{eee}fff}ggg
is it possible to find all matches based on outer curly braces?
m = re.findall(r'\{.+?\}', s, re.DOTALL)
returns
['{bbb}', '{ddd{eee}']
but I need:
['{bbb}', '{ddd{eee}fff}']
Is it possible with python regex?