string aaa(string str)
        {
            int index = str.IndexOf('>');
            str = str.Substring(index+1);
            int index1 = str.LastIndexOf('<');
            return str.Substring(0, index1);        }

解决方案 »

  1.   

    网页数据蜘蛛?
    a.Split('>')[1].Split('<')[0];
      

  2.   

       string content = "<td class=td_right>9.9000</td><td class=td_right>22</td>";
                Regex htmlRegex = new Regex(@"<td[^>]*>(?<Content>[^<]*)</td>");
                MatchCollection mc = htmlRegex.Matches(content);
                foreach (Match m in mc)
                {
                    Console.WriteLine(m.Groups["Content"].Value);
                }
      

  3.   

    使用正则表达式:                    Regex re = new Regex("<.*?>(.*?)<.*?>", RegexOptions.Multiline);
                        if (re.IsMatch(input))
                        {
                            foreach (Match item in re.Matches(input))
                            {
                                if (item.Groups.Count > 1)
                                {
                                    for (int i = 1; i < item.Groups.Count; i++)
                                    {
                                        sb.Append(string.Format(" 分组{0}:{1}", i, item.Groups[i].Value));
                                    }
                                }
                            }
                        }
      

  4.   

    >(\s+)?\d+(\.\d+)?(\s+)?<
    匹配结果再去匹配\d+(\.\d+)?