No, actually i was wrong about this subject. The correct Regular Expression for this is the following:
preg_match_all("/(<\?.*?\?>)/ims",$text,$source_code);
The anterior was greedy, and so it matched the following:
<? echo "aaa"; ?><html><? echo "bbb"; ?>
And now it only takes the text between <? and ?>, even multilined code.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

