Few small bugs in the MT940 @bankfile driver

Dear Invantive,
few remarks on the swift-MT940 driver (in my case bank file provided by ABN AMRO)
I’m running QueryTool 20.0.66

  • some extracted fields from the driver are sometime mistaken, when the data contains the / char;
    the / will escape the extraction thus miss the content after
  • some few sequences are not extracted at all, not being recognized by the driver. I have not been able to find why.

I wrote this regex correction in order to have a better match.

I can provide some example files if Invantive would like to dig into this.


  ,regexp_substr(InformationToAccountOwner,'(?<=\/EREF\/)(.*)($)') AS EndToEndReference
      WHEN regexp_substr(InformationToAccountOwner,'(?<=\/REMI\/)(.*)(?=\/EREF)|$') like '%' -- is not null
      THEN regexp_substr(InformationToAccountOwner,'(?<=\/REMI\/)(.*)(?=\/EREF)|$')
      ELSE Unparseable
      AS RemittanceInformation
      WHEN regexp_substr(InformationToAccountOwner,'(?<=\/NAME\/)(.*?)((?=\/REMI)|(?=\/EREF))') is not null
      THEN regexp_substr(InformationToAccountOwner,'(?<=\/NAME\/)(.*?)((?=\/REMI)|(?=\/EREF))') 
      ELSE CounterPartyIdName
      AS Name
      WHEN regexp_substr(InformationToAccountOwner,'(?<=\/IBAN\/)(.*)(?=\/BIC)') is not null
      THEN regexp_substr(InformationToAccountOwner,'(?<=\/IBAN\/)(.*)(?=\/BIC)')
      ELSE CounterPartyIdAccountNumber
      AS Sender_IBAN
from  BankStatementLines@Bankfiles