package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\b[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]{1,4}\b`)
var str = `121.121.121.121:8081 2.103384 Китай high 05-07-2014 09:25:17
222.222.222.222:8081`
var substitution = ""
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/