package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(,\d{3}$)`)
var str = `1
00:00:06,000 --> 00:00:12,074
- = www.OpenSubtitles.org = -
2
00:01:35,623 --> 00:01:38,208
Apollo Três aqui.
Houston, você pode me copiar?
3
00:01:39,168 --> 00:01:41,378
Apollo Três, aqui é Houston.
Voce me ouve
4
00:01:41,503 --> 00:01:43,797
Bem recebido, de Houston.
Apollo Três aqui.
5
00:01:44,340 --> 00:01:48,385
Apollo Três, está tudo bem aqui.
6
00:01:49,428 --> 00:01:52,973
- Lee, você pode me copiar?
- Você é recebido, Capcom. Que falador.`
var substitution = "$1\n<font color=#FFFF00>"
fmt.Println(re.ReplaceAllString(str, substitution))
}
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/