Example:
1 2 3 4 5
would be:
1 2 3 4 5
Solution:-
RegexOptions options = RegexOptions.None;
Regex regex = new Regex("[ ]{2,}", options);
tempo = regex.Replace(tempo, " ");
myString = Regex.Replace(myString, @"\s+", " ");
1 2 3 4 5
would be:
1 2 3 4 5
Solution:-
RegexOptions options = RegexOptions.None;
Regex regex = new Regex("[ ]{2,}", options);
tempo = regex.Replace(tempo, " ");
myString = Regex.Replace(myString, @"\s+", " ");
No comments:
Post a Comment