Page 1 of 1

Match [any] dollar amount

PostPosted: Fri Oct 04, 2019 7:31 pm
by project_guru
I need to search inside the contents of PDF invoices. One piece of data I need to obtain is the dollar amount. I will then use this to rename the file (which I already know how to do).

The problem is that invoice amounts are always different and with a different number of digits. Therefore, I can't simply come up with a pattern for X number of digits.

What would be the best approach to achieve this?

Thanks in advance for any help.

Re: Match [any] dollar amount

PostPosted: Mon Oct 07, 2019 11:12 am
by Mr_Noodle
Try matching with surrounding text. See if there's some text that always precedes the dollar amount, for instance, and use that in your pattern to isolate which number you want to grab.