This is my string: "This Is {{ dsfdf {{dsfsd}} ewrwrewr }} My Result"
.
I want to remove the outer curly brackets with their content.
The result should be "This Is My Result"
.
This is my best shot at the moment:
Text = Regex.Replace(Text, "{{([^}]*)}}", String.Empty);
but it doesn't work well. I get "This Is ewrwrewr }} My Text"
Perhaps it should be solved with Balance Matching...
I would be very appreciate if someone could help me solve it, because although many tries I couldn't do it myself.