using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_\@.&+]|[!*'(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+";
string input = @"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";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx