求一个HTML正则公式,谢谢

admin87 · 2017-12-02 16:26:02 · 1492 次点击

如果<meta name="author" content="polaris <polaris@studygolang.com>"> 后边还有HTML标签呢?

#2
更多评论

你用了懒惰模式,改为:

re,_ = regexp.Compile("\<[\S\s]+\>")
#1
re := regexp.MustCompile(`\<[\S\s]+?">`)
#3