package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`^([\d.]+)\s+([\d.:]+)\s+(TRACE)\s+\[(\d+)] GDS:.*?ClientID:\s*''\s*->\s*'(\d+)'$`)
var str = `17.02.09 10:42:31.242 TRACE [1245] GDS: someText(SomeText).ClientID: '' -> '99071901'`
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/