Compare commits

...

1 Commits

Author SHA1 Message Date
rick.chan a33724a664 将 ( 和 ) 与中文分割开.
Signed-off-by: rick.chan <chenyang@autoai.com>
2021-04-21 14:21:05 +08:00
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ func fileClose(file *os.File) {
}
func insertSpace2Line(line string) string {
reg1 := regexp.MustCompile("([A-Za-z0-9?/,*])([\u4e00-\u9fa5])")
reg2 := regexp.MustCompile("([\u4e00-\u9fa5])([A-Za-z0-9?/,*])")
reg1 := regexp.MustCompile("([A-Za-z0-9?)/,*])([\u4e00-\u9fa5])")
reg2 := regexp.MustCompile("([\u4e00-\u9fa5])([A-Za-z0-9?(/,*])")
line = reg2.ReplaceAllString(reg1.ReplaceAllString(line, "$1 $2"), "$1 $2")
return line
}