正则匹配img标签 蜘蛛 爬取分析 新闻采集


string ostr = "aaaaaa<img asddsa src=\"\" asddsasd />aaaaaaa<img src=\"\" />";
Match m = Regex.Match(content, @"(<img.*?src=.*?/>)", RegexOptions.IgnoreCase);
if (m.Success)
{
string s = m.Value;
}

posted @ 2013-12-25 17:40  程序猿网友666  阅读(291)  评论(0编辑  收藏  举报