package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?im)^(?<tz_utf>(?:\([^)]+\)|[^-]+)+)\s+-\s+(?<tz>[^:]+)\s+:\s+(?<fr>[^/]+)\s+/\s+(?<en>[^/]+)\s+/\s+(?<ar>\S+)\s+(?<tz_dec_utf>[ⴰ-⵿ -]+)\s+(?<tz_dec>.*)$`)
var str = `ⵜⴰⵙⵎⵙⵙⵉⵜ - tasmessit : Focalisée / Focus / QCÉÑe ⵜⴰⵙⵎⵙⵙⵉⵜ - ⵜⵙⵎⵙⵙⵉⵜ - ⵜⵉⵙⵎⵙⵙⵉⵜⵉⵠtasmssit - tsmssit - tismssitin
ⵜⴰⵙâµâ´°âµ¥âµ–ⵓⵕⵜ ( âµ-) - tasnaÇvurt (n-) : Etymologique / Etymological / »dÉKCG ⵠⵜⵙâµâ´°âµ¥âµ–ⵓⵕⵜ n tesnaÇvurt
ⵜⴰⵙⵖⵓâµâµœ ⵜⴰâµâ´°â´·â´°âµ¡âµœ - tasvunt tanadawt : Subordonnant / Subordinating (conjunction) / §HGQ ⵜⴰⵙⵖⵓâµâµœ ⵜⴰâµâ´°â´·â´°âµ¡âµœ - ⵜⵉⵙⵖⵡⴰⵠⵜⵉâµâ´°â´·â´°âµ¡âµ‰âµ tasvunt tanadawt - tisevwan tinadawin`
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/