Link to home
Start Free TrialLog in
Avatar of KavyaVS
KavyaVS

asked on

Reading the file from specific line to specific line

I want to get a substring between <body> to </body>

Dim Files As String() = System.IO.Directory.GetFiles("c:\temp\temp1")
            Dim readpages As New ReadingPages()
            For Each sFile As String In Files
                If readpages.IsaspxFile(sFile) Then
                    Dim fileCont As String = System.IO.File.ReadAllText(sFile)
                    'it found something
                    If fileCont.Contains("<body>") = True Then
                     'I want to read the contents from <body> to </body>
                    End If
                End If
               
            Next

Open in new window


Thanks
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KavyaVS
KavyaVS

ASKER

Thanks