This example illustrates trimming the “!” character from the end of the string

 
    Dim str As String = "This is a string, with a comma!"
    str = str.TrimEnd(CChar("!"))
    MsgBox(str)

This example look for 4 numbers after 2 specific characters

 
    Dim phoneNum As String = "CT8964"
    If (phoneNum Like "CT####") Then
      MsgBox("Found it")
    Else
      MsgBox("Nope")
    End If