RE: [PHP] ereg

From: Date: Fri, 11 Jan 2002 06:21:13 +0000
Subject: RE: [PHP] ereg
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80163@lists.php.net to get a copy of this message
You should use preg_match_all() for this. Something like this should do (didn't try it thou): preg_match_all("|<!--start-->(.*)<!--stop-->\">|U", $lineofhtml, $output, PREG_PATTERN_ORDER); Niklas -----Original Message----- From: Kunal Jhunjhunwala [mailto:kunal@getmonked.net] Sent: 11. tammikuuta 2002 5:56 To: php-list Subject: [PHP] ereg This is my code : ereg("<!--start-->(.*)<!--stop-->", $lineofhtml, $output); The problem is that, with <!--start-->(.*)<!--stop--> it matches everthing from the first <!--start--> to the last <!--stop-->... hence it appears its all in one array... what I need to do is tell it to stop at the first <!--stop--> and I can't figure out how to do that... any ideas? Regards, Kunal Jhunjhunwala -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#80163) next »