Code Monkey home page Code Monkey logo

Comments (4)

wolph avatar wolph commented on August 14, 2024

The big question is always what all of the numbers mean here. You can see what the regex is parsing here for reference: https://regex101.com/r/7J7El8/1

Do you have any documentation from your bank to indicate how they build these strings?

from mt940.

JonathanNEMRY avatar JonathanNEMRY commented on August 14, 2024

@wolph thanks you very much yes the bank give us this file I think it comes from the carrage return that incldes sub lines
MT940_V2_fr.pdf

from mt940.

wolph avatar wolph commented on August 14, 2024

The issue here isn't in the newline, that's actually supported and working. The issue is with the / in the customer reference: 341241773/1XXXXX. As far as I am aware this is the only bank that has a / in the customer reference but the / was explicitly disallowed to support the // coming after that point.

So... I'm not yet sure how to solve this. It's going a bit beyond what a regular expression can do (specifically I'm fighting greediness)

from mt940.

wolph avatar wolph commented on August 14, 2024

It took a pretty hacky regular expression, but the current version still works with all old tests but also supports the / in the customer reference that Multiline uses.

Give the new release a try and let me know if it works for you :)

from mt940.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.