Re: Help with ereg()
| From: | Derick Rethans | Date: | Tue, 11 Mar 2003 13:25:59 +0000 |
| Subject: | Re: Help with ereg() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-95010@lists.php.net to get a copy of this message | ||
Hello,
please forward user questions to the php-general@lists.php.net
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.
Derick
On Tue, 11 Mar 2003, fLIPIS wrote:
> Hi all. I'm trying to deal with Regular Expressions, but somehow it is
> getting more difficult. IŽm trying to do the folowing:
>
> Read a text and get all of the PHP code out of it, highlight it and then
> print all in nice HTML. I'm using this to get the PHP code:
>
> ereg("<\?.*\?>",$Text,$PHP_code);
>
> It works, yeah, but on a situation like this:
>
> <?
> echo "aaaa";
> ?>
> This is some other no php code
> <?
> echo "this is PHP";
> ?>
>
>
> Thanks all. I think this post is somewhere in the list, with another
> subject.
>
>
>
>
--
"my other box is your windows PC"
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
-------------------------------------------------------------------------