Re: Problem with RegEx for BBCode

From: Date: Sat, 27 Nov 2010 19:08:04 +0000
Subject: Re: Problem with RegEx for BBCode
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-309725@lists.php.net to get a copy of this message
On Sat, Nov 27, 2010 at 14:05, Daniel P. Brown <daniel.brown@parasane.net> wrote: > On Sat, Nov 27, 2010 at 13:55, Asmann, Roland <Roland.Asmann@adesso.at> wrote: >> >> $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "<i>\\1</i>", >> $s); > >    This is exactly what I meant when I erroneously said, "library." Without seeing the rest of your code, try adjusting this particular preg_replace() line as follows: $s = preg_replace("/\[i\](.*)\[\/i\]/Us","<i>$1</i>",$s); -- </Daniel P. Brown> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/

« previous php.general (#309725) next »