i have searched for it but when i try that code:
Private Shared Function GetTitle(html As String) As String
Dim r As New Regex("<title.*?>")
Dim Title_start As Integer = 0
Dim Title_end As Integer = 0
For Each m As Match In r.Matches(html)
If m.Value.ToLower = "<title>" Then
Title_start = m.Index + m.Length
Exit For
End If
Next
r = New Regex("</title.*?>")
For Each m As Match In r.Matches(html)
If m.Value.ToLower = "</title>" Then
Title_end = m.Index - Title_start
Exit For
End If
Next
Dim title As String = html.Substring(Title_start, Title_end)
Return title
End Function
Then it gives me a error: REXES IS NOT DEFINED
can someone help me with that or suggest something else?
also i am using Visual Studio 2010

New Topic/Question
Reply



MultiQuote




|