diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/quote_parsing/parse_emails.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/python/quote_parsing/parse_emails.py b/python/quote_parsing/parse_emails.py index 12cc65a5..a6b416ec 100644 --- a/python/quote_parsing/parse_emails.py +++ b/python/quote_parsing/parse_emails.py @@ -795,12 +795,16 @@ def parse_gs_eu(fh, index_desc): # subject_baml = re.compile(r"(?:Fwd:){0,2}(?:BAML )?(\D{2})(\d{1,2})\s") regex_dict = { - re.compile(r"(?:Fwd:){0,2}(?:BofA )?(\D{2})(\d{1,2}).*Ref[^\d]*([\d.]+)"): ( + re.compile(r"(?:Fwd:){0,2}(?:BofA|BAML )?(\D{2})(\d{1,2}).*Ref[^\d]*([\d.]+)"): ( + "BAML", + parse_baml, + ), + re.compile(r"(?:Fwd:){0,2}(?:BofA )?(XOVER|MAIN) S(\d{1,2}).*Ref[^\d]*([\d.]+)"): ( "BAML", parse_baml, ), re.compile( - r"[^$]*(?:\$|\€){1,2} MS (?:CDX|ITX) OPTIONS: (IG|HY|MAIN|XO)(\d{2})[^-]*- REF[^\d]*([\d.]+)" + r"[^$]*(?:\$|\€){1,2} MS (?:CDX|ITX) OPTIONS: (IG|HY|MAIN|XO|FIN SEN)(\d{2})[^-]*- REF[^\d]*([\d.]+)" ): ("MS", parse_ms), re.compile(r"(?:Fwd:)?CDX (IG|HY)(\d{2}).*- REF:[^\d]*([\d.]+)"): ( "NOM", @@ -858,7 +862,9 @@ def parse_email(email: Path, date_received: datetime.date, conn): indextype = "EU" if indextype.upper() in ("MAIN", "MA") else indextype indextype = "XO" if indextype.upper() == "XOVER" else indextype - indextype = "EUFS" if indextype.upper() == "FINSEN" else indextype + indextype = ( + "EUFS" if indextype.upper() in ("FINSEN", "FIN SEN") else indextype + ) series = int(series) cur_pos = fh.tell() |
