Closed varac closed 11 months ago
Are you sure the old version handled it correctly? Using ""
as an regex would match any text, as far as I can see it:
>>> "Matched" if re.match("","") else "No Match"
'Matched'
>>> "Matched" if re.match("","not empty") else "No Match"
'Matched'
>>> "Matched" if re.match("^$","") else "No Match"
'Matched'
>>> "Matched" if re.match("^$","not empty") else "No Match"
'No Match'
If you want to match the empty string, use ^$
instead.
I have to say that I find using ""
as a match much more intuitive, though. Maybe requiring regexes there was not the best decision, but that is kind of hard to change now.
I will do something about the error message though.
Oh you're right, apparently it never matched but I didn't realize it :facepalm:
Using "^$"
works !
No, I really like that regex can be used, it makes fints2ledger much more flexbile.
I have a lot of theses matching rules where I want to match a transaction where the payee must empty:
Latest fints2ledger fails with:
When I remove the
payee: ""
line it works. Old fints2ledger handled this case fine.