package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(\d[ \-.)]{0,3}){11,20}|(\b[\d]{3}\b)[^,.]`)
var str = `1546
4 8 6 2 6 4 1 1 5 3 6 6 6 7 7 1
5378 2052 1163 1153
6011-7614 4775 1364
333 112,55 mdsksajfk
05536080
214
12/05
12/08
122sss 222222222222111 22464 222 222ss, 222,22 22.22 333215122 22 33 123456789012
122.44
445
1546
4 8 6 2 6 4 1 1 5 3 6 6 6 7 7 1
5378 2052 1163 1153
6011-7614 4775 1364
333 112,55 mdsksajfk
11947285580
(11)947285580
1194728-5580
11 94728 5580
346.549.668-32
46254966832
31604523875
10154511,55
12/56/12019`
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/