Re: Re: BBCode?

From: Date: Mon, 25 Nov 2002 06:58:26 +0000
Subject: Re: Re: BBCode?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-125893@lists.php.net to get a copy of this message
Thanks a lot, but do you know how to do the same with ereg_replace? I'm trying to learn PCRE, but until I do, I won't be able to add anything to this... 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.

« previous php.general (#125893) next »