第一种<img src=http://tbn0.google.com/images?q=tbn:csh_W3KPG_5n4M: width=124 height=102>
第2种
http://www.cnbruce.com/blog/uploadfile/JPG/2006-10/5-86921-10.jpg这两种的````谢谢大家了`555

解决方案 »

  1.   

    就是我下载了html代码,我要找出所有的图片
      

  2.   


    第一种
    string yourStr = .............;
    MatchCollection mc = Regex.Matches(yourStr, @"<img\s*src=(['""]?)(?<img>[^'""\s>]*)\1[^>]*>", RegexOptions.IgnoreCase);
    foreach (Match m in mc)
    {
        richTextBox2.Text += m.Groups["img"].Value + "\n";
    }第二种什么意思,都是以http://开头,以.jpg结尾的吗
    MatchCollection mc = Regex.Matches(yourStr, @"http://\S*?\.jpg", RegexOptions.IgnoreCase);
    foreach (Match m in mc)
    {
        richTextBox2.Text += m.Value + "\n";
    }