Extract dynamic text from a PDF

Dear, I have the following problem.
I need to extract transactions from a account statement, the problem is that there are statements in which the same amount of movements does not come, so the movements are variable.

Example 1:
image

I need to find the way that regardless of the number of transactions if I have one transaction or twenty transactions, it pulls all the transactions from the page.

thanks in advance.

Hi @msaavedra

Would it help to extract the text from the entire page and then post-process it (let’s say, with Regex), to get the data?

2 Likes

Hi @loginerror

Can you please share the tutorial link of ReGex available on UI Academy.

Thanks!

Hi @msaavedra
Welcome to UiPath Community!

Use Read PDF Text Activity to read the pdf and store it in an output variable.
Now Take an assign activity and write this for another variable. let’s say
transactions=System.Text.RegularExpressions.Regex.Match(output variable,“(?sim)(?<=word before your transaction).*(?=word after your transaction)”).value
Every time it will extract the text which is in between those two words.

Hope this helps.
Happy Automation!

Regards,
Aditya