String.Split Method (Char[])
Public Class SplitTest
Public Shared Sub Main()
Dim words As String = "this is a test."
Dim split As String() = words.Split(New [Char]() {" "c, ","c, "."c, ":"c, CChar(vbTab) })
For Each s As String In split
If s.Trim() <> "" Then
Console.WriteLine(s)
End If
Next s
End Sub 'Main
End Class 'SplitTest
Related examples in the same category