Re: stripping enclosed text from PHP code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/04/06, Winfried Meining <wim@xxxxxxxxx> wrote:
>
> Hi,
>
> I am writing on a script that parses a PHP script and finds all function calls
> to check, if these functions exist. To do this, I needed a function that would
> strip out all text, which is enclosed in apostrophes or quotation marks. This
> is somewhat tricky, as the script needs to be aware of what really is an
> enclosed text and what is PHP code.

So use the built in tokenizer functions which know exactly what's
enclosed text and what is php code. Much quicker and more reliable
than trying to do the same job with regular expressions.

http://se.php.net/tokenizer

  -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux