Comment 6 for bug 1317021

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

The four includes the 'N' which is placed outside the group.

Reading the specs more closely, it says nowhere that the type field is numeric, so the better regex would be

tag_61_regex = re.compile(
        '^(?P<date>\d{6})(?P<sign>[CD])(?P<amount>\d+,\d{2})N(?P<type>.{3})'
        '(?P<reference>\w{1,16})')

I prepared an MP, could you test that please?