package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`((?:[^\x00-\x7F]|[a-zA-Z]\s*)+)(\d+\/\d{2})`)
var str = `Ericsson Sistemas de Energia Ltda 1029384756/00
Ericsson Telecomunicações 0192837465/00
Telefônica do Brasil Ltda 5647382910/00
Tim do Brasil Ltda 3669278723/00
Telemar Telecomunicações Ltda 5463782113/00
Vivo do Brasil Ltda 7588697132/00
Oi Telecomunicações Ltda 1253467264/00
Claro do Brasil Ltda 0980966535/00
Telecomunicações Ltda 3562989272/00`
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/