package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\bisempty\s+\w+`)
var str = `"isempty var0 && v1== 56"
"v2 == 50 || isempty var1"
"Q3 == 100 || (isempty var2)"
"isempty var3"
"is thisnotisempty var4"`
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/