golang把字符串里的中文删除
package main
import "regexp"
func main() {
text := "hello 世123界asdaf好的"
re := regexp.MustCompile("[\u4e00-\u9fa5]+")
r := re.ReplaceAllString(text, "")
println(r)
}
package main
import "regexp"
func main() {
text := "hello 世123界asdaf好的"
re := regexp.MustCompile("[\u4e00-\u9fa5]+")
r := re.ReplaceAllString(text, "")
println(r)
}