Hello,
I have a column in excel with rows as DC123, 345, DC789
I need just number but not the alphabets before them.
What condition do I need to apply here.
I am a UI path beginner, so pls help me.
Please help.
Regards,
Raviteja.
Hello,
I have a column in excel with rows as DC123, 345, DC789
I need just number but not the alphabets before them.
What condition do I need to apply here.
I am a UI path beginner, so pls help me.
Please help.
Regards,
Raviteja.
There are 2 simple ways using vb.net to extract only numbers:
String.Concat(text.Where(AddressOf Char.IsDigit))
or
System.Text.RegularExpressions.Regex.Replace(text, "[^0-9]", "")
Second example is using a Regex pattern β[^0-9]β, where β^β is for not and means not a number 0-9, so it replaces everything else.
There are also some activities you can use the Regex pattern in, for example the βIs Matchβ activity and returns a Boolean variable that you can use in condition.
Or just use the above examples directly in conditions or assign activities.
Hope this helps.
Regards.
As @ClaytonM Answered
String.Concat(My_String.Where(AddressOf Char.IsDigit)) should work without any complications.