I have to find the code blocks from the given code using Regex in C#.
e.g. I have to find the For loop block from the following code
For A in 1..10
Loop
stmt1;
For C in cur_op
Loop
stmt2;
end loop;
end loop;
For T in 4..8
loop
stmt3;
end loop;
I want to retrieve the code blocks as
For A in 1..10
Loop
stmt1;
For C in cur_op
Loop
stmt2;
end loop;
end loop;
and
For T in 4..8
loop
stmt3;
end loop;
Can anyone suggest me any Regex for this?
Thanks.