package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\b(?:v(?:s?\.|:)?)\s*(.*)`)
var str = `Zinaida Shumilina et al. v. Belarus
CCPR/C/120/D/2142/2012
K.E.R. vs. Canada
CCPR/C/120/D/2196/2012
Lounis Khelifati v Algeria
CCPR/C/120/D/2267/2013"
Hibaq Said Hash v. Denmark
CCPR/C/120/D/2470/2014"
Anton Batanov v. Russian Federation
CCPR/C/120/D/2532/2015"
S. Z. v. Denmark
CCPR/C/120/D/2625/2015"
`
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/