Need help with extracting data using RegEx

Hello Friends! I am new to UiPath and am in some help with a workflow I am creating.

Here is the scenario: I need to extract a certain piece of data from a website. (see below)The follow data i need is “12345678”.

“Your appointment request has been received but not yet processed.Load ID 12345678 has been assigned for your reference. Please review the Dock Commitments screen after sometime to see the assigned date and time or review your Carrier Schedule Report.”

I then save my data to a variable (ApptIDValue) and this is then added to a datarow within my data table i have. And what the issue is, i am not sure why the data table is showing 2; instead of 12345678. It was working before and now everytime the datatable in excel will have the number 2. Please help! :slight_smile:

Hi @kwhites5229

Welcome to forum

You can try regex like as below

Nived N
Happy Automation

Thank you ! :slight_smile:

does this look correct?

Try add the sample text in the Test Text section

See whether it is matching


(?<=Load ID )[0-9]+ this is the regex pattern

Nived N

Happy Automation

@kwhites5229 - If you unsure of what to select …I would suggest, do not click on “Configure Regular Expression”. Just put your Input and Pattern in the properties as shown below…

unfortunately i can only test in live environment - but i will try this later when it runs and let you know thank you!

will try this option to thank you!!:slight_smile:

Hi guys I am getting this error when for when I tried to change the regex statement, so this error is happening after the regex.

Can you tell me what this means?

Hi guys, this is what i am getting… i am not sure what i am doing wrong here. Please advise if you can !

here is the error i am seeing

Hi @kwhites5229

Can u show value in Assign activitiy ?

and this is what the regex was -

Let’s say u had the output of regex matches in output_1 varaible

Then to get the value in string format use Assign activitiy as below

loanid= output_1.ElementAt(0).ToString


In ur case replace
LoadIDExtracted(0).ToString with

okay thanks so much i am going to try this now! :slight_smile:

1 Like

Please mark it as solution if it works for you @kwhites5229

that is the error i received ^

Can u check LoadIDExtracted.Count?