如题,比如下面:
<a href="http://q.163.com/exclusive/forum/">专属90后</a>我要取到“专属90后”这个字符串,请问该怎么做啊?谢谢!

解决方案 »

  1.   

    如果网页代码比较标准 可以当xml来查找
    或用正则 这里有http://topic.csdn.net/t/20050730/19/4178683.html
      

  2.   

    参考
    http://topic.csdn.net/t/20061217/00/5236019.html
      

  3.   

    多谢大家,特别感谢bossma ,已解决
      

  4.   


    string s = "...........";   
    Regex re = new Regex(@"<a[^>]*href=(""(?<href>[^""]*)""|'(?<href>[^']*)'|(?<href>[^\s>]*))[^>]*>(?<text>.*?)</a>", RegexOptions.IgnoreCase | RegexOptions.Singleline);   
    Match m  = re.Match(s);   
    if(m.Success)   
    {   
      string link = m.Groups["href"].Value;   
      string text = Regex.Replace(m.Groups["text"].Value,"<[^>]*>","");   
      Console.WriteLine("link:{0}\ntext:{1}", link, text);   
    }
    过去看过saucer(思归)的一段,给你吧~
      

  5.   

    http://topic.csdn.net/t/20051213/18/4457219.html