Module TrimEnd
Public Sub Main()
Dim sentence As String = "this is a test."
Dim charsToTrim() As Char = {","c, "."c, " "c}
Dim words() As String = sentence.Split()
For Each word As String In words
Console.WriteLine(word.TrimEnd(charsToTrim))
Next
End Sub
End Module