package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)http[s]?://(?:[a-zA-Z]|[0-9]|[$-_\@.&+]|[!*'(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+`)
var str = `Xem thêm nội dung được đề xuất cho riêng bạn. https://vt.tiktok.com/ZSFNnnkf2/
Xem thêm nội dung được đề xuất cho riêng bạn. https://vt.tiktok.com/ZSFNnnkf2/
5.17 Xzt:/ 10/13 H@i.pQ QQ炫舞系列赠送龙年多重好礼,无需下载点开即玩! # QQ炫舞 # 游戏 # 龙年 https://v.douyin.com/iNYLXGru/ 复制此链接,打开Dou音搜索,直接观看视频!
0.51 p@q.Rx lpD:/ 12/19 真的好浪漫啊,公主请看@ https://v.douyin.com/iNYNd6Ns/ 复制此链接,打开Dou音搜索,直接观看视频!
Xem thêm tại https://www.facebook.com/story.php?story_fbid=pfbid0YNXQNNzHc39zjUhbMar7Fh2UsjooeemZkLJpQ1Q3phq8QvtEAY1Rc75qatoi6ku3l&id=100064769740799&mibextid=Nif5oz
xem thêm https://www.facebook.com/share/v/VDjQdshbUq72CQbe/?mibextid=oFDknk`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/