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,



It's not a bug, it's a feature.
christoph starkmann
ICQ: 100601600

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to