ereg

From: Date: Fri, 23 Nov 2001 14:56:18 +0000
Subject: ereg
Groups: php.general 
Request: Send a blank email to php-general+get-75581@lists.php.net to get a copy of this message
As far as I can say, a simple ereg-command is always greedy, isn't it? Can you tell me how to switch greedy off? I want to find everything between the start- and end-php-tags: $phpIncludes = array(); ereg("<\?php.*\?\>", $html, $phpIncludes); where $html contains the entire page, containing one php-script-section at the very top and one at the very botton, and maybe some inbetween. Now the above ereg always returns me the entire site in $phpIncludes[0]; All help is appreciated, thanx a lot, cheers, Kiko ----- It's not a bug, it's a feature. christoph starkmann mailto:kiko@nfq.de http://www.fh-augsburg.de/~kiko ICQ: 100601600 -----

« previous php.general (#75581) next »