package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`([^: ]+:[^:]+:([^:]+):[^:]+:[^:]+)(:[^: ]+)`)
var str = `almada-institute.com:25:info@almada-institute.com:info12345:"hello":nossl in-graph.com:25:info@in-graph.com:info123456789:"hello":nossl get-herbals.net:25:info@get-herbals.net:info321:"hello":nossl
`
var substitution = "\1<\2>\3"
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/