package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\h*(\d*)t(\d*)o\+?p\+?:\h*`)
var str = `F 1t2op+:vAWGPHGM
F t12o+p: vAWGPHGM
F1t2op+:vAWGPHGM
F 12top+: vAWGPHGM`
var substitution = "$1$2+ "
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/