Jason Wong wrote:
It's not working because it's doing a greedy match. Try (I prefer the PCRE functions over EREG):
$text = preg_replace("/\[i\](.*)\[\/i\]/U", "<i>$1</i>", $text);
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php