急::求正则表达式【不够加分】

ibugttp 2010-12-20 09:05:52
求百度网页搜索结果、GOOGLE网页搜索结果、bing网页搜索结果、youdao网页搜索结果、yahoo网页搜索结果链接提取正则

不要搜索结果中广告的、快照的、翻页链接的
...全文
51 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ibugttp 2010-12-20
  • 打赏
  • 举报
回复
这样的问题好像太难了
wuyq11 2010-12-20
  • 打赏
  • 举报
回复
MatchCollection mc= Regex.Matches(str, @" <a[^> ]*href=([ ' " "]?)(? <url> [^ ' " "> \s]*)\1?[^> ]*> (? <text> [^ <]*) </a> ", RegexOptions.IgnoreCase);
foreach (Match m in mc)
{
Response.Write(m.Groups[ "url "].Value);
Response.Write(m.Groups[ "text "].Value);
}
MatchCollection mc = Regex.Matches(Str, @"(?i)<a(?>(?:(?!href=)[^>])*)href=(['""]?)(?<url>[^""'\s>]*)\1[^>]*>(?<text>[\s\S]*?)</a>");

110,526

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧