How to get 9 digit doc code from a text file using uipath

Hi All,

I have a many text files in different format. I have to get a 9 digit code that starts with a 8 series or a 10 digit code that starts with 9. Either of the one exist each time.
Can some one help in achieving this logic?

Thanks.

@Naragani_Chiranjeevi Can you check with this Expression :

System.Text.RegularExpressions.Regex.Matches(yourString,“8\d{8}|9\d{9}”)(0)

2 Likes

Hi @Naragani_Chiranjeevi,

try this regex pattern —> (8\d{8}|9\d{9})

System.Text.RegularExpressions.Regex.Match(Number.ToString,"(8\d{8}|9\d{9})").Value

2 Likes