salam Posted April 29, 2010 Posted April 29, 2010 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 Quote
mark007 Posted May 17, 2010 Posted May 17, 2010 Look into system.text.regularexpressions. Something like this would do it: 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 Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.