master
Bel LaPointe 2025-06-05 12:00:20 -06:00
parent 4526a8f2cb
commit eed07ff89c
1 changed files with 2 additions and 0 deletions

View File

@ -284,12 +284,14 @@ func (c *amexScraper) scrape(m *mail.Message) ([]*Transaction, error) {
vendor = string(vendors[0])
}
vendor = strings.TrimSpace(strings.Trim(strings.Trim(vendor, ">"), "<"))
vendor = strings.ReplaceAll(vendor, "\n", "")
accs := regexp.MustCompile(`Account Ending: [0-9]*([0-9]{4})[^0-9]`).FindSubmatch(b)
acc := "?"
if len(accs) > 1 {
acc = string(accs[1])
}
acc = strings.ReplaceAll(acc, "\n", "")
transaction := NewTransaction(
fmt.Sprintf("%s-%s", Amex.String(), acc),