package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)Igroup Name:\s+((?:[\w-]+,\s*)*[\w-]+)`)
var str = `Address: c8245A626
AliasName: eSrb002359_f1
Igroup Name: rtvclar002359, unjlclar002358-9,
cokeclar00RCB_FC
Protocol: REST`
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/