package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)batiment restructur[eé]`)
var str = `plateaux entièrement rénovés XXXXXX immeuble de style industriel restructuré
surface livrée rénovée et climatisée dans un magnifique immeuble haussmannien restructuré
batiment restructuré XXXXXX plateau livré entièrement rénové et décloisonné
parking exterieur restructuré XXXXX bureau rénové
`
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/