package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(((([0-9])?[A-Z]{1,})(([A-Z0-9./+]+){0,}-){1,})[A-Z0-9./+]+\=*)`)
var str = `The ABC-CD40N= is also supported on GH-K slots on the 4000 Series ISRs using the XYZ-X-THM . This SM-X-NIM-REW34= information is not captured in the table above terms with only digits shoud not match --> 1-800-553-6387 hdhdhh IP-IP
YUIO-10GB-BG4: Supports JK-X6824-UIO-XK++= U-VI1.1-100-WX-Y9
VA-V
XX-123-UVW-3456
VA-V-W-K9
VA-V-W
800-CVB-4=
CD-EF-GH-40G-R9(=)
`
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/