you could use regex:
vb Code:
Dim testStr As String = "SHG9001233 SHG9001234 SHG9001235" Dim rx As New Regex("[A-Z]{3}\d+") For Each m As Match In rx.Matches(testStr) MsgBox(m.Value) Next
don't forget to import regex:
vb Code:
Imports System.Text.RegularExpressions




Reply With Quote