Răsfoiți Sursa

stringFind去除文本删除空格功能

maxiaoshan 2 ani în urmă
părinte
comite
97a199529e
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/spider/script.go

+ 2 - 2
src/spider/script.go

@@ -922,8 +922,8 @@ func (s *Script) LoadScript(site, channel, user *string, code, script_file strin
 		regstr := S.ToString(-1)
 		text := S.ToString(-2)
 		textReg := regexp.MustCompile(regstr)
-		spaceReg := regexp.MustCompile("[\\s\u3000\u2003\u00a0]+")
-		text = spaceReg.ReplaceAllString(text, "")
+		//spaceReg := regexp.MustCompile("[\\s\u3000\u2003\u00a0]+")
+		//text = spaceReg.ReplaceAllString(text, "")
 		result := textReg.FindString(text)
 		isMatch := false
 		if result != "" {