html source code

salam

Newcomer
Joined
Apr 16, 2010
Messages
4
hi,

I have html source code in file.txt. I want to read a keyword from it.
for example

html Source:
=======================
<base href="http://bytes.com/" /><!--[if IE]></base><![endif]--> <title>How to save and read very big Array Value to/from file in VB.NET? - Visual Basic .NET answers</title> <meta http-equiv="Content-/>
====================
I want to read the title from above html source from <title>How to save and read very big Array Value to/from file in VB.NET? - Visual Basic .NET answers</title>
and save it in another file.

plz if any one have any idea or any linkes will help me .... plz help me
 
Look into system.text.regularexpressions.

Something like this would do it:

Visual Basic:
Dim r As New System.Text.RegularExpressions.Regex("<title>(.+?)</title>")
Dim m As System.Text.RegularExpressions.Match = r.Match(strText)
System.Windows.Forms.MessageBox.Show("Title is: " & m.Captures(0).Value)

Though note I've not tested.

Mark
 
Back
Top