How to extract particular words from string

I want to extract Claim Id followed by 12 digit number .Below is the format
“MHR Review. Refer to Claim ID 230470012300
Danielle Drury”

In this string digit is dyamic but length of the digit is fixed…I want to extract claim id with 12 digit . below is the type of format i may encounter in this strings till claim id is fixed .
“MHR Review. Refer to Claim ID 230490097200
Heather Patz”

“MHR Review. Refer to Claim ID 230460040500-per discussion w/Brenda Ruse
Danielle Drury”

“MHR Review. Refer to Claim ID 230470012300
Danielle Drury”

we can use regex:

HI @Neha_Aggarwal1

How about this expression

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=Claim\sID\s)\d{12}").Tostring

image

Regards
Gokul

could u plz brief more how to use this expression in which activity

HI @Neha_Aggarwal1

Use this above expression in the Assign activity

Regards
Gokul

we can use: matches Activity

OR

Assign Activity along with Statements:
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

with this expression am only getting 12 digit number but i want claim id also with 12 digit

Try with this expression : (?<=Claim\sID\s)\d+

image

Regards,

thanku for help

thanku so much for help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.