I have a string value I-200-1354679709.
How can I extract last 5 digits of the number using String operations in UiPath
@Siva_Priya
give try to use regex with the pattern from below.
with string methods you can try following
new String(strText.Reverse().Where(Function (x) IsNumeric(x)).Take(5).Reverse().toArray)
1 Like
@Siva_Priya An alternative solution using Substring method might also be possible :
str = "I-200-1354679709"
str.Substring((str.Length-5),5)
1 Like
Thank you. This worked.
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.