Hi all, 

I was scratching my head to accomplish the following perl regular 
expression. It doesn't want to catch me [^\{php}]. From what I understood 
reading the docs this is because in a negative class the caracters are being 
taken litteraly one by one and not as a set. I tied to enclose them by () by 
that didn't work eigher. What is the work around for this? 

here's a sample code: 

$text = ' 

some text ... 

        echo "some funcy code to include he{re";

more text.... 


$out = preg_split("/(\{php}[^\{php}]*\{\/php})/i", $text, -1, 



Maxim Maletsky 

Founder, Chief Developer
PHPBeginner.com (Where PHP Begins) 


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

Reply via email to