Quellcode durchsuchen

stringFind去除文本删除空格功能

maxiaoshan vor 2 Jahren
Ursprung
Commit
97a199529e
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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 != "" {