package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(.+?|)(tir(a|o)?|dispar(a|o)?|lanz(a|o)?|mape(a|o)?|us(o|a)?)(.+?|)(sonda|planeta|burbuja|mater?)(.+?|)\?`)
var str = `Alguien tiene alguna imagen donde se vea donde tirar las sondas para escanear planetas?
tiro sondas?
lanzar sondas?
lanzo sonda?
mapear planetas?
uso las sondas?
disparan sondas?
usas las sondas?
usa las sondas?
usais las sondas?`
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/