Skip to content

parser error #111

@p3ls

Description

@p3ls

Hello there,

thanks for this lib. works very well but recently i ran into a parser error with an STA file.
this line

:61:2207060706DR20,NTRFBIPI-dvT1FzfMqvzF5HaU4oetlH7SGRkonU//2022070616391534000

produced an error

matching id=61 (len=75) "2207060706DR20,NTRFBIPI-dvT1FzfMqvzF5HaU4oetlH7SGRkonU//2022070616391534000" against
    ^
    (?P<year>\d{2})  # 6!n Value Date (YYMMDD)
    (?P<month>\d{2})
    (?P<day>\d{2})
    (?P<entry_month>\d{2})?  # [4!n] Entry Date (MMDD)
    (?P<entry_day>\d{2})?
    (?P<status>R?[DC])  # 2a Debit/Credit Mark
    (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd character of the currency
                            # code, if needed)
    [\n ]? # apparently some banks (sparkassen) incorporate newlines here
    # cuscal can also send a space here as well
    (?P<amount>[\d,]{1,15})  # 15d Amount
    (?P<id>[A-Z][A-Z0-9 ]{3})?  # 1!a3!c Transaction Type Identification Code
    # We need the (slow) repeating negative lookahead to search for // so we
    # don't acciddntly include the bank reference in the customer reference.
    (?P<customer_reference>((?!//)[^\n]){0,16})  # 16x Customer Reference
    (//(?P<bank_reference>.{0,23}))?  # [//23x] Bank Reference
    (\n?(?P<extra_details>.{0,34}))?  # [34x] Supplementary Details
    $
no match for '    $' against '534000'

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions