试试吧不知道正不正确:
\<a.+?href=['""](?!http\:\/\/)(?!mailto\:)(?>foundAnchor>[^'"">]+?)[^>]*?\>

解决方案 »

  1.   

    Regex.Replace(str, @"<a[^>]*>(?<content>.*?)</a>","${content}",RegexOptions.IgnoreCase | RegexOptions.Singleline);
      

  2.   

    http://www.regexlib.com/DisplayPatterns.aspx?cattabindex=1&categoryId=2
      

  3.   

    好象还是不行,我已经改成
    string test = @"<a href='View.aspx?Id=4'>盐移分司[2004]132号</a>";
    Regex.Replace(test, @"<a[^>]*>(?<content>)</a>", "${content}");
    this.Label1.Text = test;
    这样了,显示出来的还是原来test的值,但
    Regex.IsMatch(test, @"<a[^>]*>.*</a>")是true,就是Replace那一段老写不对,请指教。
      

  4.   

    搞定了
    this.Label1.Text = Regex.Replace(@"<a href='View.aspx?Id=4'>盐移分司[2004]132号</a>", @"^\s*<a[^>]*>\s*(?<content>\S*)\s*</a>\s*$", "${content}");
    就行了