This is what I constructed for you will definitely help you to solve your problem.
protected void Page_Load(object sender, EventArgs e)
{
Regex regex = new Regex(@"\>\s+\<");
string str = "<ol> <li>one </li> <li>one two </li> <li>three</li></ol>";
str = regex.Replace(str, new MatchEvaluator(Replacingit));
}
public string Replacingit(Match match)
{
string temp = match.Value;
while (temp.Contains(" "))
{
temp = temp.Replace(" ", " ");
}
return temp;
}
Thanks