Regex problem
| From: | Oliver Ertl | Date: | Thu, 30 Nov 2000 19:05:36 +0000 |
| Subject: | Regex problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28099@lists.php.net to get a copy of this message | ||
Hi,
I would like to get the value between tow HTML-Tags (ex <b></b>).
This is working fine with the code on the end of this mail.
The Problem is when <b> and </b> are not on the same line. For example:
<b>start tag
(new line) end tag</b>
How do I need to change the code below to get this working.
<?
$url = fopen("http://www.lug-burghausen.org/news/06-00.html");
while (!feof($url)) {
$line = fgets ($url, 10000);
$line = eregi_replace("<link(.*)>", "", $line);
if ( eregi("<b>(.*)</b>", $line, $text) );
echo strip_tags($text[1]), "<br>\n";
}
}
?>
Thanks.
Oliver