Regex:Extract data from PDF

Hi everyone!

I’m using regex to get data from PDF. I use this code in the online regex tester and it matches the data. But when I use it in UiPath, the data was not read. Here’s the code:

(?<=AMOUNT:\s[$])(.*?(?=\s))

Here’s the data:

AMOUNT: $ 1,719.00

This is what it looks like:
image

Also what code can you suggest if I want to get the payee name but the name is not standard, meaning the number of words varies (e.g. JOHN JANE DOE INSURANCE). And there’s a succeeding word which also varies in each PDF (e.g. o=Business)?

Here’s the sample data:

PAYEE: JOHN JANE DOE INSURANCE o=Business

Thanks!

Instead please check this…

I tried it but didn’t work. Please see attached for more accurate text.

Sample.txt (124 Bytes)

@cldt - It’s working perfectly. Please see below…

Thank you, it works!

Do you have any suggestion to my other question regarding the regex for the payee? I’m having trouble because the digital signature was placed near the payee line so when read, it also captures the content of the digital signature.

@cldt - if you could share some examples , we can take a look and provide a pattern which suits…

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