<IMG  height=96 alt=cccz hspace=0 src="/ddd/UploadFile/200609041302561391.jpg" width=109 border=0>我想得到"/ddd/UploadFile/200609041302561391.jpg,谢谢

解决方案 »

  1.   

    <img.*src=[\']?([^\']*)[\']?[^/]*[/]?>Regex regex = new Regex ( this.TextBox2.Text, RegexOptions.Compiled | RegexOptions.IgnoreCase );

    foreach ( Match matchItem in regex.Matches ( this.TextBox1.Text ) )
    {
    if ( matchItem.Groups[1] != null )
    {
    this.Label4.Text+=matchItem.Groups[ 1 ].Value ;
    }
    }
      

  2.   

    Regex regex = new Regex ( ◎“<img.*src=[\']?([^\']*)[\']?[^/]*[/]?>”, RegexOptions.Compiled | RegexOptions.IgnoreCase );

    foreach ( Match matchItem in regex.Matches ( 内容 ) )
    {
    if ( matchItem.Groups[1] != null )
    {
    this.Label4.Text+=matchItem.Groups[ 1 ].Value ; //输出
    }
    }
      

  3.   

    (?:IMG|img)[^>]+src=\"?([^>\"]+)