private static string Clean(string s)
{
// matched character sequences are passed to a MatchEvaluator
// delegate. The returned string from the delegate replaces
// the matched sequence.
return Regex.Replace(s, @" {2,}|\s", delegate(Match m)
{
return " ";
});
}