I am trying to use regex to get rid of strings between specific characters, for example "[" and "]":
input = "There is a [blue] cloud on top of that [big] elephant";
desiredOut = "There is a cloud on top of that elephant"; // this is what i want
But if I use regex to replace what is between "[" and "]" I remove everything between the first and last of this characters:
string input = "There is a [blue] cloud on top of that [big] elephant";
string regex = "(\\[.*\\])" ;
string actualOut = Regex.Replace(input, regex, "");
actualOut = "There is a elephant" // this is what i get
Any clues on how to remove the stuff between inmediate delimiters? thanks.