The extraction can be made as simple or as complicated as you wish. That is not
the problem.
The problem appears to be one of defining rules which will RELIABLY find the
account number in the extracts.
If you can define the rules, they can be coded.
It's unusual for an accounting application to export information in such an
unstructured form. In particular, I would be extremely surprised if the export
can't be redefined so as to put the account numbers into a field of their own.
After all, they will be being held separately inside the accounting application.
I would recommend going back to the people doing the extract, and get them to
structure it more appropriately.