package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\b(\p{L}{3}),\ (\p{L}{3})\ (\d\d),\s(\d\d\d\d)\ at\ (\d\d?):(\d\d)\ ([AP]M)`)
var str = `kardashian, kim this is dummy text area
mercury, freddie Tue, Aug 23, 2016 at 2:21 PM
22.11.2016 08:58 AM
last_name, first_name
bjorge, philip `
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/