Sam OZ
asked on
Split numeric and non numeric in a string
I have a vb.net string for RevNo
I need a function that splits the numeric and alpha
For example 1A should be split as 1 A ( split as Major and minor)
10A should be 10 A
I need a function that splits the numeric and alpha
For example 1A should be split as 1 A ( split as Major and minor)
10A should be 10 A
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim revno = "10A"
Dim numbers = New String(revno.Where(Function(x) Char.IsDigit(x)).ToArray)
Dim chars = New String(revno.Where(Function(x) Char.IsLetter(x)).ToArray)
MsgBox(numbers & " => " & chars)
Open in new window