Re: Non Greedy ereg

From: Date: Wed, 03 Jan 2001 22:54:35 +0000
Subject: Re: Non Greedy ereg
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32555@lists.php.net to get a copy of this message
On Wed, 3 Jan 2001, Ben Wiechman wrote: > How do I make an ereg statement non-greedy? I am using it to pull the title > out of all the pages in a given site, but it's taking all the code in php > pages from the start of the first title tag, to the end of the last... > (where there are several different titles in the page.) Obviously, this > creates some problems. > > Ben > Try putting "[^>]" or "[^<]" in there somewhere. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#32555) next »