package zhios_tool_utils import ( "regexp" "strings" ) func TrimHtml(src string) string { re, _ := regexp.Compile("<[\\S\\s]+?>") src = re.ReplaceAllStringFunc(src, strings.ToLower) re, _ = regexp.Compile("") src = re.ReplaceAllString(src, "") re, _ = regexp.Compile("") src = re.ReplaceAllString(src, "") re, _ = regexp.Compile("<[\\S\\s]+?>") src = re.ReplaceAllString(src, "\n") re, _ = regexp.Compile("\\s{2,}") src = re.ReplaceAllString(src, "\n") return strings.TrimSpace(src) } func TrimScript(src string) string { re, _ := regexp.Compile("<[\\S\\s]+?>") src = re.ReplaceAllStringFunc(src, strings.ToLower) re, _ = regexp.Compile("") src = re.ReplaceAllString(src, "") re, _ = regexp.Compile("") src = re.ReplaceAllString(src, "") return src }