what regex could remove whole function body even, if curly brackets are nested ?
What I have so far is re.sub('{.*?}', '', source)
however, it doesn't work with nested brackets so it wont remove line 5 and 6. I know that similiar question to this is already written here several times, however, still cannot find solution
1. int foo(void){
2. if(cond){
3. code
4. }
5. next few
6. lines of code
7. }
10. typedef struct strfoo{
11. code
12. }
thanks in advance