Single statement to remove multiple spaces in a string

Posted by VIJI Friday, July 3, 2009

We can use System.Text.RegularExpressions Namespace to remove multiple spaces in a string

For example

Imports System.Text.RegularExpressions

Dim MyTrimmedWord() As String = Regex.Split(textbox1.text, "\s+")


will remove multiple spaces from the string

0 Responses to Single statement to remove multiple spaces in a string

Post a Comment