Parsing HTML pages

G

Guest

If I have the html from webpage loaded into a string. How would I use regex
to return sections from within that html string?

I want to be able to get the "text" back between two different tags.
Basically I want to scrape some web pages and populate a database.

Does anybody have a snippet of code that could me out get the "text"?
 
N

Nick Hounsome

MisterKen said:
If I have the html from webpage loaded into a string. How would I use
regex
to return sections from within that html string?

I want to be able to get the "text" back between two different tags.
Basically I want to scrape some web pages and populate a database.

Does anybody have a snippet of code that could me out get the "text"?

Is it XHTML? If so you can just read it as an XmlDocument.
 
A

Alvin Bruney - ASP.NET MVP

have a look at regexlib.com, they have several expressions that you can
modify.

--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top