using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
{
class Program
{
static void Main(string[] args)
{
string str = File.ReadAllText("1.htm",Encoding.UTF8);
MatchCollection ms = Regex.Matches(str,@"""(http://.+?)""");
if (ms.Count!=0)
{
for (int i = 0; i < ms.Count;i++ )
{
if (ms[i].Success)
{
Console.WriteLine(ms[i].Groups[1].Value);
}
}
}
Console.ReadKey();
}
}
}
原文链接:https://www.f2er.com/regex/361003.html