diff --git a/parsers.py b/parsers.py index 56a4e10..4e1b3ac 100644 --- a/parsers.py +++ b/parsers.py @@ -124,7 +124,7 @@ class MBNAParser(TransactionParser): class BMOParser(TransactionParser): EXTRACT_RE = re.compile( - r"We want to let you know that a (withdrawal|deposit) of\s+\$(\d+\.\d{2})\s+has been made (?:to|from) your account ending\s+in\s+(\d{3})", # noqa: E501 + r"We want to let you know that a (withdrawal|deposit) of\s+\$([0-9,]+\.\d{2})\s+has been made (?:to|from) your account ending\s+in\s+(\d{3})", # noqa: E501 flags=re.MULTILINE, ) @@ -146,7 +146,7 @@ class BMOParser(TransactionParser): if matches is None: raise TransactionParsingFailed("No matches for extraction RE") - amount = Decimal(matches[2]) + amount = Decimal(matches[2].replace(",", "")) if matches[1] == "withdrawal": amount = amount * -1 date_raw = msg["Date"]