Remove Alphabets before Numbers in Excel

excel

#1

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.


#2

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.


#3

As @ClaytonM Answered

String.Concat(My_String.Where(AddressOf Char.IsDigit)) should work without any complications.