string sourceString = @"asdf< href=""ss.exe"" asdf";
string pattern = @"(href=""[^""]*"")";
System.Text.RegularExpressions.MatchCollection results = Regex.Matches(sourceString,pattern,System.Text.RegularExpressions.RegexOptions.IgnoreCase);
foreach(Match result in results)
{
WL(result.Groups[1].Value);//输出
                 }

解决方案 »

  1.   

    有什么规律,就是取HREF=后的内容吗,取一个还是多个取一个的
    string yourStr = ............;
    Match  m = Regex.Match(yourStr, @"href=(['""]?)[^""\s>]*\1", RegexOptions.IgnoreCase);
    if(m.Success)
    {
        MessageBox.Show(m.Value);
    }同时取多个的
    string yourStr = .............;
    MatchCollection mc = Regex.Matches(yourStr, @"href=(['""]?)[^""\s>]*\1", RegexOptions.IgnoreCase);
    foreach (Match m in mc)
    {
        richTextBox2.Text += m.Value + "\n";
    }
      

  2.   

    [过客]的正则很历害的,他终于又出现了。
      
    -----------------------------------------------
    msn:[email protected]
      

  3.   

    没有来晚吧? href=['"]?(?<name>[^'"\s]*)