现有文件内容如下
NSTL 国 家 科 技 图 书 文 献 中 心 所属馆藏: 
外文学位论文数据库    【正题名】:Cyclic stress-strain response and dislocation substructure evolution of nickel.
    【作者】:Jia, Yan.
  【作者单位】:Clarkson University.
 【学位授予年】:2002
 【论文集名称】:Dissertation Abstracts International
    【卷期】:vol.62-11B.
    【ISBN】:0493450653
    【页码】:p.5334
   【总页数】:170
  【授予学位】:ph.D.
【授予学位单位】:Clarkson University.
  【导师姓名】:Moosbrugger, John C.
  【研究专业】:Engineering, Mechanical.; Engineering, Metallurgy.
  【培养单位】:Clarkson University.
   【馆藏号】:AAI3032513
   【分类号】:TH; TF
  【正文语种】:eng
    【文摘】:The cyclic stress-strain response and substructure evolution of initiallyannealed pure nickel (high stacking fault energy FCC material) were studied by  
 
NSTL 国 家 科 技 图 书 文 献 中 心 所属馆藏: 
外文学位论文数据库    【正题名】:Equity and distribution of resources and performance across elementary andmiddle schools within large urban school districts: Evidence from New York City.
    【作者】:Iatarola, patrice.
  【作者单位】:New York University.
 【学位授予年】:2002
 【论文集名称】:Dissertation Abstracts International
    【卷期】:vol.62-11A.
    【ISBN】:0493472924
    【页码】:p.3697
   【总页数】:324
  【授予学位】:ph.D.
【授予学位单位】:New York University.
  【导师姓名】:Stiefel, Leanna
  【研究专业】:Education, Finance.; political Science, public Administration.; Education,Administration.
  【培养单位】:New York University.
   【馆藏号】:AAI3034578
   【分类号】:F8-4; D0; G4
  【正文语种】:eng
    【文摘】:This study examines the distribution of resources and outputs across elementaryand middle school students in New York City's public schools. New York City
我要将 【】:后的内容提取出来,请教好办法 

解决方案 »

  1.   

    先读出一行,再对字符串解析出你想要的字串.参考:
    读写文件:public ReadFile(string strFileName)
    {
      StreamReader sr = new StreamReader(strFileName),System.Text.Encoding.Default);
      while (sr.Peek() >= 0) 
      {
         Console.WriteLine(sr.ReadLine());
      }
      sr.Close();  
    }Public Shared Sub WriteFile(ByVal strLog As String, ByVal page As System.Web.UI.Page)       
            If Directory.Exists(page.Server.MapPath("LogFolder")) = False Then
                Directory.CreateDirectory(page.Server.MapPath("LogFolder"))
            End If
            Dim pw As StreamWriter = New StreamWriter(page.Server.MapPath(".") & "\LogFolder\log.txt", True, System.Text.Encoding.UTF8)
            pw.WriteLine(strLog)
            pw.Flush()
            pw.Close()
        End Sub
      

  2.   

    string contentString="";
    if (System.IO.File.Exists(filePath))
    {
    System.IO.StreamReader sr= new System.IO.StreamReader(filePath,System.Text.Encoding.Default);
    while(sr.Peek()>=0)
    {
    string lineString=sr.ReadLine();
    string[] contentList=lineString.Split(':');
                        contentString+=contentList[1];                  
    }
    sr.Close();
    }
      

  3.   

    using (StreamReader sr = new StreamReader(dirs[k],System.Text.Encoding.GetEncoding("GB2312")))
                    {
                        int i=1;
                        while (sr.Peek() >= 0) 
                        {
                            string s = sr.ReadLine().Trim();
                            if (-1 == s.IndexOf("】:"))//没有字段的情况
                            {
                                continue;
                            }
                            else
                            {
                                switch(i)
                                {
                                    case 1:
                                    {
                                        //操作
                                        i++;
                                        break;
                                    }
                                    case 2:
                                    {                                }
                 case 18:
                                    {
                                   //因为有18项所以在这,把i=1,然后写数据库
                                    }
                               }
                    }
      

  4.   

    这样好处在于不用判断字符串,速度稍微快点,缺点是(-1 == s.IndexOf("】:"))或许是在某一行中有,那就玩完了
      

  5.   

    把txt文件读出来放在一个string input里面。。using System.Text.RegularExpressions;
    string input=this.textBox4.Text;
    input=input.Replace("【","<");
    input=input.Replace("】",">");
    string pa=@"<.*?>:(.*?\r\n)";
    Regex reg=new Regex(pa);
    string output=reg.Replace(input,"$1");