string strPat = "<a href=html/2008/.+?>";
Match m = Regex.Match(sRet,strPat);
while (m.Success)
{
sHref=m.ToString();
Console.WriteLine(sHref);
m = m.NextMatch();
}
取一个网页的源码找出其中的连接,
那么 sHref 就是 <a href=html/2008/222.html> 这样的,
我就想要 .+? 这部分的,
该怎么做? 谢谢
Match m = Regex.Match(sRet,strPat);
while (m.Success)
{
sHref=m.ToString();
Console.WriteLine(sHref);
m = m.NextMatch();
}
取一个网页的源码找出其中的连接,
那么 sHref 就是 <a href=html/2008/222.html> 这样的,
我就想要 .+? 这部分的,
该怎么做? 谢谢
Match m = Regex.Match(sRet,strPat);
while (m.Success)
{
sHref=m.Groups[1].Value;
Console.WriteLine(sHref);
m = m.NextMatch();
}