Re: Change color of anything in double/single quotes

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

 



On Sat, Apr 25, 2009 at 13:50, Marc Steinert <lists@xxxxxxxxxx> wrote:
>
> $string = preg_replace('/"(.*?)"/', '<font color=color>"\\1"</font>',
> $string);

    Close, but I'd also recommend dropping in a 'Us' modifier so that
it is `U`ngreedy and `s`pans lines.

<?php
  $regexp = '/"(.*?)"/Us';
?>

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

-- 
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