package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^(\w*[0-9]+)\w*$`)
var str = `R3KEE
RK3DSW
RN80OW
R800U
7Q5RU
R2023NY
3DA0AQ
RW6APC
R7FQ
4X52A
4J6A
PY7AB
ROMAN 36 RAKITIN
ROMAN36RAKITIN
RAEM
`
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/