' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Module Program
    Sub Main()
        Dim s As String = "AN KP:bla bla bla"
        Dim ix As Integer = s.IndexOf(":")
        Dim s2 As String = s.Substring(ix + 1)
        Console.WriteLine(s2)
        Dim txt As String = "A:bla bla" & vbCrLf & "B:mere bla bla" & vbCrLf & "C:igen igen"
        Dim lines() As String = txt.Split(vbCrLf.ToCharArray(),  StringSplitOptions.RemoveEmptyEntries)
        For i As Integer = 0 To lines.Length-1 
            Dim lineix As Integer = lines(i).IndexOf(":")
            lines(i) = lines(i).Substring(lineix + 1)
        Next
        txt = String.Join(vbCrLf, lines)
        Console.WriteLine(txt)
    End Sub
End Module
