Page 1 of 1

Extracting html information

Posted: Mon Apr 10, 2006 3:39 pm
by simonk
I have the following code stroed in a html file:

<div class="class1">
<a href="http://www.yahoo.com">Yahoo</a>
A search engine
<div class="category">search</div>
</div>

How can I use regular expression to extract the link 'www.yahoo.com', the name 'Yahoo' and the description and the category 'Search' into one array?

I know I should use the preg_match and {} but I just cant get this work..

Please help,
Many many thanks.

CF K

Posted: Mon Apr 10, 2006 4:22 pm
by hawleyjr
Have you looked in the The Useful posts thread?


feyd | locked, cross posting.