Imports System Imports System.Text.RegularExpressions Public Module Module1 Public Sub Main() Dim regex As Regex = New Regex("SN: \d+") Dim match As Match = regex.Match("Agen 05, Pembelian SM5.08132166171 Hrg=5500 SUKSES SN: 3778882223. Saldo Rp.(Awal 780700 Akhir 775200)") If match.Success Then Console.WriteLine(match.Value) End If End Sub End Module
SN\s*:\s*(\d*)
Dim match As Match = Regex.Match(inputstring, "SN\s*:\s*(\d*)", RegexOptions.IgnoreCase) If match.Success Then ' Write value. MessageBox.Show(match.Groups(1)) ' will give 3778882223 End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)