Replace multiple spaces in the string with single space Posted by CMaster Answer: This can be easily done with regular expression: test = Regex.Replace(test, @"s{2,}", " ");