|
-
Feb 18th, 2009, 11:44 AM
#1
Thread Starter
New Member
[RESOLVED] Parse HTML with Regex
Thanks to threads found on this forum I've been able to grab a web page and place it into a document. I now have certain text that I need to extract from the page. This text is always surrounded by the same HTML tags.
<h3><a id=link1 href="http://www.site.com"><b>Listing Title</b></a></h3><cite>MyWebsite.com</cite> Come visit my awesome website!<li class
I cut off at "<li class" because the actual class is not the same from one to the next.
The things I need to grab from this block are, in order:
link1
Listing Title
Come visit my awesome website!
MyWebsite.com
There are 10-15 of these blocks on a page, so I'd like to loop this and store each to its own set of text boxes...
text1.text = link1
text2.text = Listing Title
etc etc..
I'm slightly familiar with PHP so I know I have to do this with regex, but I'd really appreciate some help figuring out how to go about actually putting this together.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|