On 27-11-10 18:44, Asmann, Roland wrote:
> On 27-11-10 17:24, Daniel P. Brown wrote:
> > On Sat, Nov 27, 2010 at 08:57, Asmann, Roland <[email protected]>
> > 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
>
> I'm afraid that is not an option, I don't have that package installed
> and am not allowed to install anything on the server either...
Besides, what I don't really understand is WHY does this happen? Any
other language that has RegEx doesn't match a thing in my example and
just returns the original input. Why is PHP different in this regard?
--
Roland Asmann
Senior Software Engineer
adesso Austria GmbH
Floridotower 26. Stock T +43 1 2198790-27
Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E [email protected]
W www.adesso.at
-------------------------------------------------------------
>>> business. people. technology. <<<
-------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php