package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(?<!If I )(?:recalls?|recalled)`)
var str = `Hi, I am talking about a recall on the product I bought last month. If I recall correctly, I purchased this at your store on august 15th. Can you tell me if I can get a refund on this recall?`
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/