Remove the extra commas from the string using C#


Suppose our string is in following format


string input = “Test1,, Test2,,,,,”;


string result =
Regex.Replace(input, “,+”, “,”).Trim(‘,’);


http://stackoverflow.com/questions/4405703/remove-extra-commas-in-c-sharp

Bye.