MatchCollection matches = Regex.Matches(_sb, @"""(?\S+?(7z))""", RegexOptions.IgnoreCase);_sb :   ... href="/aa/bb/cc.7z" ...取/aa/bb/cc.7z
               

解决方案 »

  1.   

      string pattern = @"(?is)(?<=<a[^>]*?href=([""']))[^""']+(?=\1)";
              
      

  2.   


    MatchCollection matches = Regex.Matches(_sb, "(?is)href=\"([^\"]*?)\"");
    foreach(Match ma in matches)
    {
    ma.Groups[0].Value; //就是/aa/bb/cc.7z
    }
      

  3.   

    取出来都是 空的  foreach (Match match in matches)
                    {
                        //links.Add(match.Groups["href"].Value);
                        listBox1.Items.Add(match.Groups["href"].Value);
                    }这个写错了?