Re: Problem with RegEx for BBCode

From: Date: Sat, 27 Nov 2010 16:24:37 +0000
Subject: Re: Problem with RegEx for BBCode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-309711@lists.php.net to get a copy of this message
On Sat, Nov 27, 2010 at 08:57, Asmann, Roland <Roland.Asmann@adesso.at> wrote: > Hi all, > > I am playing around with PHP and BBCodes and have found some regex's > that should transform my BBCode into correct HTML when rendering. > However, I have found that if the BBCode is not correct (eg missing > closing tag), the regex completely eats my input and my page is empty! [snip!] > > What I would like is that when no closing tag is found, the opening tag > should just be shown as-is. Anybody have any idea how I can do this? Have you checked into the built-in BBCode library? http://php.net/bbcode -- </Daniel P. Brown> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/

« previous php.general (#309711) next »