我无法从文本文件中提取记录并将它们分成一个数组。
所有记录均采用以下格式:
--------------------------- CITATION 01 OF 99 -------------------------
Authors: Oliver, Ron
Oliver, Helen
Title: Information Access and Retrieval with Hypermedia Information Systems. /
by Oliver, Ron; Oliver, Helen
Pub.Date: 1996
Document no.: EJ520272
FOUND IN: British Journal of Educational Technology; v27 n1 p33-44 Jan 1996
Abstract: Describes an investigation of the search strategies employed by
novice users of an interactive information system. A class of 12-year-old
students was instructed in use of an electronic encyclopedia, which they used
as an information source for projects and to complete skills tests. Students
employed inefficient search strategies and had difficulty creating search
requests for information-related problems. (Author/JKP)
Pub.Type: Research/technical(143); Journal article(080)
Language: English
RIE/CIJE issue: CIJJUL96
If not avail. in your library or through ILL, for sale from: UMI
Minor Identifiers: Electronic Media
Major Descriptors: Hypermedia
Information Retrieval
Online Searching
Optical Data Disks
Search Strategies
Minor Descriptors: Access to Information
Elementary Education
Encyclopedias
Information Sources
Problems
ISSN: 0007-1013
--------------------------- CITATION 02 OF 99 -------------------------
Authors: Kimmel, Stacey
Title: Robot-Generated Databases on the World Wide Web. / by Kimmel, Stacey
Pub.Date: 1996
Document no.: EJ520165
FOUND IN: Database; v19 n1 p40-43,46-49 Feb-Mar 1996
Abstract: Provides an overview of robots that retrieve World Wide Web documents
and index data and then store it in a database. Nine robot-generated databases
are described, including record content, services, search features, and sample
search results; and sidebars discuss the controversy about Web robots and other
resource discovery tools. (LRW)
Pub.Type: Descriptive(141); Journal article(080)
Language: English
RIE/CIJE issue: CIJJUL96
If not avail. in your library or through ILL, for sale from: UMI
Major Identifiers: World Wide Web
Minor Identifiers: Examples
Major Descriptors: Databases
Information Retrieval
Online Searching
Robotics
Minor Descriptors: Comparative Analysis
Indexing
Problems
Search Strategies
ISSN: 0162-4105
And so on....
我只需要以下信息:文本文件中每条记录的作者、标题、发现和摘要。你到底是怎么做的?
我的代码:
Public Class Form1
Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click
Dim fd As New OpenFileDialog()
fd.Title = "Please select a txt file"
fd.InitialDirectory = Application.StartupPath & "\inc"
fd.Filter = "Text Documents (*.txt)|*.txt"
fd.Multiselect = False
fd.RestoreDirectory = True
Dim strFileName As String
If (fd.ShowDialog() = DialogResult.OK) Then
strFileName = fd.FileName
Dim sr As System.IO.StreamReader = System.IO.File.OpenText(strFileName)
Dim recs As String = sr.ReadToEnd
''Dim rec() As String = recs.Split(" ")
sr.Close()
txtAbstract.Text = recs(0)
End If
End Sub
End Class
我正在使用 Microsoft Visual Studio 2010 Express。提前致谢。