Hi @Mansour_Dalir ,
You can use regular expressions to match the text in the specific format you need.
Modify the regular expression according to the format you need.
Dim pattern As String = "\b[1][0][L][B]+\w*[-XQ]+\w*\b"
Dim input As String = "N 3-SH 3-sh 3-sh 3-SH N
10LBB09
EQUIPMENT = 10LBA01GF002
10LBA01GF002
N 1 1-BLACK 10LBA04CT004-XQ01 1-BLACK 1 10LBA04 N
N 2 1-L.BLUE 10LBA04CT004-XQ01 1-L.BLUE 2 10LBA04 N
N 1-SH 1-SH 1-SH 1-SH N
N 3 2-BLACK 10LBA04CT005-XQ01A 2-BLACK 3 10LBA04 N
N 4 2-L.BLUE 10LBA04CT005-XQ01B 2-L.BLUE 4 10LBA04 N
N 4 2-L.BLUE 10LBA04CT05-XQ01B 2-L.BLUE 4 10LBA04 N"
Dim matches As MatchCollection = Regex.Matches(input, pattern)
For Each m As Match In matches
Console.WriteLine(m.Value)
Next
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.