He everyone,

Sorry if this is in the wrong spot i believe this is the proper spot. anyways, i am using the code below to read a text file and then separate the line where it finds a :: - my problem is what if i have a line like:

FilePath=C:\file.txt::Name=Text::Subject=CIM

I would like to display the Name on a list box and when it is selected then the file can be opened, my problem is i don't know how to get just the Name= part without getting everything else.

Help would be greatly appreciated and if you require any more information please let me know.

Code:
   Private Function read()
        Dim FILE_NAME As String = My.Application.Info.DirectoryPath & "\FileInfo.txt"
        Dim txtfile As New System.IO.StreamReader(FILE_NAME)
        Dim textline As String
        Do While txtfile.Peek() <> -1
            textline = txtfile.ReadLine()
            '------------------------
            If textline.StartsWith("Filepath=") Then
                Dim modtextline As String
                modtextline = Replace(textline, "Filepath=", "")
                Dim fields() As String
                fields = Split(modtextline, "::")
            End If
        Loop
    End Function
File Contents are:
SubjectNames=CIM::Chemistry::Trigonometry
Filepath=C:\file.txt::Name=1::Subject=CIM

It would be nice to only need to have Filepath=C:\file.txt::FileName::CIM just because i am manually entering lines right now until i ocmplete the rest of the program, plus i would like to only have it search for the line that starts with Filepath= so then it knows that this line it needs to read