package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\b\d{1,3}(?:\.\d{3})*,\d+\b`)
var str = `|C195|1|Base de Cálculo ST: 2.608,24 - Valor da ST: 2.608.234,24 12.608.234,24
163,66|
d2.608.234,24
2.60d8.23d4,24`
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/