I convert a HTML code to plain text.But there are many extra returns and spaces.How to remove them?
string new_string = Regex.Replace(orig_string, @"\s", "")
will remove all whitespace
string new_string = Regex.Replace(orig_string, @"\s+", " ")
will just collapse multiple whitespaces into one