浏览代码

stringFind去除文本删除空格功能

maxiaoshan 2 年之前
父节点
当前提交
97a199529e
共有 1 个文件被更改,包括 2 次插入2 次删除
  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 != "" {