I am using expression to replace text as follow:
RegularExpressions.Regex.Replace(" <Test>", @"&(.|\n)*?;", " ");
which give result Test
But i want result <Test>
.
Why not simply this?
string result = HttpUtility.HtmlDecode(input).Trim();
Leave out the Trim
if you want to keep those spaces.