Dim s As String="BRC2532G10ST2P104" Dim i As Integer = s.Length Dim aa(),bb() As String Dim a ,b As String a="" : b="" For j As Integer = 0 To i-1 Dim t As String t=s.chars(j) If IsNumeric(t) Then a=a & t If b.EndsWith("-") =False Then b=b & "-" End If Else b=b & t If a.EndsWith("-")=False Then a=a & "-" End If End If Next a=a.Trim("-") : b=b.Trim("-") aa=a.Split("-") : bb=b.Split("-") For Each a In aa Output.Show(a) Next For Each b In bb Output.Show(b) Next
|