I'm trying use golang regex for parsing sports score, but can't found a reason, why it doesn't parse all scores parts, but only the first and the last.
package main
import (
"fmt"
"regexp"
)
func main() {
var FirstQuarterBasketballRegexp = regexp.MustCompile(`^(\d+:\d+)\s\((?:(\d+:\d+)(?:,\s)?)+\)$`)
fmt.Printf("%q
", FirstQuarterBasketballRegexp.FindAllStringSubmatch("102:72 (28:17, 27:15, 24:14, 23:26)", -1))
}
It prints a string
[["102:72 (28:17, 27:15, 24:14, 23:26)" "102:72" "23:26"]]
Why it contains only 3 elem in a slice?