Hello, I’ve been trying multiple ways to properly read a dummy invoice.
My goal was to get 4 addresses/bank details.
I managed to use regex and seperate the addresses from the pdf extract.
These addresses are in proper format (Maintains lines for Company Name, City in next line, Country in 3rd line.) and usually doesnt cross 4 lines. (I’m using count array to post them to excel rows serially.
My problem is with the banking details. These are usually in one long sentence, and often surrounded by other texts. I’ve seperated the static texts and got the whole bank address but if it was static, this could have been very easy.
The invoices are supposed to change these details, so I needed to get a dynamic extraction condition to get these banking details in 3-4 seperate lines.
My aim is to have the banking details in 3-4 lines because my output invoice will look like that.
So far I’ve used SWIFT as a delimiter to seperate that part. However I can’t figure how to seperate the street address and city/state/country name in another row.
I’ve thought of using the commas as seperators, but there can be too many commas in some address and I’m not looking for a address output that takes 7 rows.
My sample sentence would be →
HELLENIC BANK 173 Athalassa Ave., 2025 Strovolos, Nicosia, Cyprus. Swift: HEBACY2N
and target is →
HELLENIC BANK 173 Athalassa Ave., 2025 Strovolos, Nicosia, Cyprus Swift: HEBACY2N
Please note, I can’t keep any of these words in my code, as these are to be dynamic, so it can work with most banks, the only fixed part would be the Swift code.
Utmost thanks and appreciate whoever drags me out of this mess. I’m very new to UiPath, same for substrings and regex.