Page 1 of 1

preg_match...please help.

Posted: Thu Mar 04, 2004 3:31 pm
by mcog_esteban
hi all.
i'm trying to read a url and parse the html, retriving only a few parts.
ex:
<html>
<body>
<b>Results<b><br>
<table>.....</table>
<b>Another results</b><br>
<table>....</table>
</body>
</html>

using preg_match, how can i print only the content in the tables after de <b> tags?

is there another way of doing this?
thanks.

Posted: Thu Mar 04, 2004 4:34 pm
by Illusionist
i dont understand, because in your example you showed things in bold but were not in the table tags... So what do you want? All the bold text, or just text thats int he table thats bold??

Posted: Thu Mar 04, 2004 5:13 pm
by Dr Evil
I'm not good enough at this but after the manual:
[php_man]preg_match[/php_man]

you could also look at this :
http://www.hotscripts.com/PHP/Scripts_a ... _Fetching/