Extracting html information
Posted: Mon Apr 10, 2006 3:39 pm
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
<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