I'm trying to make a small scripting language using c# currently doing a block parser im stuck at making regex for block. Blocks can have ∞ times of sub blocks
This is what i need to catch
{
naber();
}
{
int x = 5;
x = 2;
if (x == 5) {
x = 5;
}
}
I tried this but not working
\{[^{}]*|(\{[^\{\}]\})*\}
This is my first post please have mercy on me