package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^(^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])|(^(?=.*[0-9])(?=.*[A-Z])(?=.*[!@#$&*]).*$)|(^(?=.*[0-9])(?=.*[a-z])(?=.*[!@#$&*]).*$)|(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$&*]).*$).*$`)
var str = `1
A
a
#
111
AAA
aaa
###
11a
11A
11a
11#
1A1
1AA
1Aa
1A#
A1a
aA1
1A#
A#1
#A1
1a#
`
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/