preg_replace_callback

preg_replace_callback

re := regexp.MustCompile(`(<p(.*?)>)`)
fmt.Println(re.ReplaceAllStringFunc("<p class='one'>sdfsd<p>sdfsf</p>fsdf</p>", func(s string) string {
	return ""
}))