package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^([\d.]+)\s+([\d:]+)\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)\s+([\d.]+|-\.-)\s+([\d.]+|-\.-)\s+([\d.]+|-\.-)\s+([\w\s()-]+?)\s+(\w+)$`)
var str = `2021.12.18 22:27:57 36.2620 28.9352 10.5 -.- 3.1 3.2 AKDENIZ Quick
2021.12.18 21:53:20 35.0258 25.7753 5.0 -.- 2.7 -.- GIRIT ADASI ACIKLARI (AKDENIZ) Quick
2021.12.18 21:26:37 36.9778 27.7713 3.8 -.- 1.6 -.- GOKOVA KORFEZI (AKDENIZ) Quick
2021.12.18 20:35:30 37.8640 35.1760 5.4 -.- 1.5 -.- PINARBASI-CAMARDI (NIGDE) Quick
i ne`
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/