解决方案 »

  1.   


               StreamReader sr = new StreamReader("test.txt");
                string line;
                while ((line = sr.ReadLine())!= null)
                {
                    if (line.IndexOf("span") != -1)
                    {
                        string s = line.Split('>')[1];
                        s = s.Split('<')[0];
                        textBox.text = s;
                        break;
                    }
                }
      

  2.   

            static void Main(string[] args)
            {
                string txt = File.ReadAllText("test.txt",Encoding.Default);
                string reg = @"<span>(.+?)</span>";
                MatchCollection mc = Regex.Matches(txt, reg);
                StringBuilder sb = new StringBuilder();
                foreach (Match item in mc)
                {
                    sb.Append(item.Groups[1]);   
                }
                Console.WriteLine(sb.ToString());
                Console.ReadKey();
            }
    正则表达式更好一些