I try to extract the currency ISO (e.g. CAD in the example below) using RegEx.
I was thinking to use a positive lockbehind, but seems that I can’t use a wildcard inside of it.
How do you suggest to do it? It works in the case below if I try only \p{Lu}{3}
but it’s too generic.
Do you have a better idea?
here is text sample:
INVOICE
TO ACME Systems Inc.
RO012326
Somewhere Road, 59
Building A
Bucharest
Romania
Payment Terms are seven days from receipt of invoice with authorised timesheet
Vendor: Megatronic Incorporated
Address: Strada Sperantei la parter
City: Bucuresti,
Country: Romania
Invoice ID: 356147
Date: 2017-07-15
Item #
1
Item Description
IT Support
Unit Price
217496 CAD
Units
1
Total
217496 CAD
Subtotal: 217496 CAD
Tax: 43499.2 CAD
Total: 260995 CAD
Just replace capitals with the output variable from the Matches activity.
It will work with all currencies (eg: CAD, USD, AUS).
If you just need CAD amounts you will need to add logic after the matches activity. Like, an ‘If’ activity, so if = CAD then do sequence otherwise do nothing.