package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`^\*(?:Field[0-9]+=0\([^)]*\),){3}Field[0-9]+=0\(\K[^)]*`)
var str = `*Field1=0(1936-S),Field13=0(2),Field2=0(),Field4=0(19.01.17),Field3=0(),Field5700=0(),Field5400=0(KS),Field14=0(21)*`
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/