diff --git a/parsers.py b/parsers.py index 6a9274d..d962e45 100644 --- a/parsers.py +++ b/parsers.py @@ -87,7 +87,7 @@ class RogersBankParser(TransactionParser): class MBNAParser(TransactionParser): EXTRACT_RE = re.compile( - r"A purchase of \$(\d+\.\d{2}) from ([^<]+) was made at (\d{1,2}:\d{2} (AM|PM)) UTC on (\d{4}-\d{2}-\d{2})" # noqa: E501 + r"A purchase of \$([0-9,]+\.\d{2}) from ([^<]+) was made at (\d{1,2}:\d{2} (AM|PM)) UTC on (\d{4}-\d{2}-\d{2})" # noqa: E501 ) def __init__(self, account_id: UUID): @@ -109,7 +109,7 @@ class MBNAParser(TransactionParser): matches = self.EXTRACT_RE.search(content) if matches is None: raise TransactionParsingFailed("No matches for extraction RE") - amount = Decimal(matches[1]) + amount = Decimal(matches[1].replace(",", "")) payee = matches[2] date_raw = matches[5] return Transaction(