Need regex to extract the data

Hi Team,

I need to extract the the Date, Details, Withdrawals, Deposit and Balance from a PDF.

I read the PDF text and I need regex to extract the information for each field. Below is the text please help me with the regex.

Apr 8 Opening Balance 5,234.09
Apr 8 Insurance 272.45 5,506.54
Apr 10 ATM 200.00 5,306.54
Apr 12 Internet Transfer 250.00 5,556.54
Apr 12 Payroll 2100.00 7,656.54
Apr 13 Bill payment 135.07 7,521.47
Apr 14 Direct debit 200.00 7,321.47
Apr 14 Deposit 250.00 7.567.87
Apr 15 Bill payment 525.72 7,042.15
Apr 17 Bill payment 327.63 6,714.52
Apr 17 Bill payment 729.96 5,984.56
Apr 18 Bill payment 223.69 5,710.87

Closing Balance $5,710.87

Hi @Yezdani_Shaik - I ignored your first and last time and able to match rest of the lines using the below pattern:

@prasath17 Thank you so much for your quick response, Can i go ahead and use the same regex in Uipath matches activity?

@Yezdani_Shaik - Sure … Do you want the write the output to excel file?

@prasath17 Yes …The output should be excel file.

@Yezdani_Shaik - Here you go… (42.2 KB)

1 Like

@prasath17 The output should be like this image

@Yezdani_Shaik - While converting PDF to text, please use Preserve format as True and then share the text file with me, I will look at it.

@prasath17 please find the attached text and Pdf files document.pdf (83.5 KB) Textout.txt (4.8 KB)

@Yezdani_Shaik - Thanks …this is getting complex, because i have to count spaces and include the values. I will try and let you know.

@prasath17 Thank you so much :slightly_smiling_face:

@Yezdani_Shaik - Phew…Done…

Let me share the workflow in a minute.

Update: Here you go: (49.9 KB)


@prasath17 Thank you so much your master :smile:

1 Like

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