package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(\b(?![A-Za-z]{7,})(?![\d]{7,})(?=[a-zA-Z\d]{2})[A-Za-z\d]{8}\b)`)
var str = `yi12345678
i1234567
i12345u8
12345678
papave23 ciao il mio pin papaver1 è reeredji332ji con vaff8loe 1234567o 123t123t papavero 9o 123t123y
dssdsdsffvdffvdfv
389223897894237234894722348972348924
`
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/