Module Module2 Class Tester Public Sub Run() 'Create some strings to work with Dim s1 As String = "http://www.bbc.co.uk" 'Constants for the space and comma characters Const Space As Char = "/" Const Fullstop As Char = "." Const Colon As Char = ":" 'Array of delimiters to split the sentence with Dim delimiters() As Char = New Char() {Space, Fullstop, Colon} Dim output As String = "" Dim ctr As Integer = 0 'Split the string and then iterate over the 'resulting array of strings Dim resultArray() As String = s1.Split(delimiters) For Each subString As String In resultArray If (subString <> "") Then ctr += 1 output += ctr.ToString() output += ": " output += subString output += vbCrLf End If Next subString Console.WriteLine(output) End Sub End Class Sub Main() Dim t As Tester = New Tester() t.Run() Console.ReadLine() End Sub End Module