Re: Regex problem

From: Date: Thu, 30 Nov 2000 21:02:05 +0000
Subject: Re: Regex problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28122@lists.php.net to get a copy of this message
Hi again, I changed the eregi to eregi("<b>((.|\n)*)</b>", $line, $text); but it is still not working. Any other ideas ? Oliver Ignacio Vazquez-Abrams wrote: > > On Thu, 30 Nov 2000, Oliver Ertl wrote: > > > 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 > > > > > > Try: > > if ( eregi("<b>((.|\n)*)</b>", $line, $text) ); > > The period doesn't match newlines. > > -- > Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#28122) next »