//Remove all HTML codes in angle brackets and replace them with line breaks re, _ = regexp.Compile("\\<[\\S\\s]+?\\>") str = re.ReplaceAllString(str, "\n") fmt.Println(str)
//Remove continuous line breaks and replace with empty
re, _ := regexp.Compile("\\s{1,}") str = re.ReplaceAllString(str, " ")