Help me automate this task of finding only numbers in a string array

There is a string array like - {123456, 12.5, L234, ABCD, 456}
Now I want only numbers, not decimals and not even those having alphabest like in the case above I mean first number(123456) and last number(456).
even if first number repeats it differentiate depending on if last number is different
I have to do this using regex. Plz help quickly

Hi @Gaurav07
Iterate your array in For Each and then Use item.ToString = System.Text.RegularExpressions.Regex.Match(item.ToString,“\d+”).ToString this condition in If. I hope this will work for you.

1 Like

hi @Gaurav07

have a look into below .xaml file

REgEX.zip (2.5 KB)

Regards
Ajay