package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(?:\G(?!\A)|\QLast Transaction(s)\E\s+)
\s*<br>\K
(?P<value>.+)`)
var str = `Your Balances: <br><br>Points Balance: 600.03<br>
<br>Last Transaction(s)
<br>01/11/2019 100050000000 Location1 $14.00
<br>11/28/2018 100053700000 Location2 $10.50
<br>10/03/2018 100051800000 Location3 $20.00
<br>06/26/2018 100047400000 Location4 $17.50
<br>06/04/2018 100046400000 Location5 $7.00
<br>`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/