Re: [PHP] Problem with RegEx for BBCode

2010-11-28 Thread Richard Quadling
On 27 November 2010 13:57, Asmann, Roland 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 co

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
Sorry people for not replying over the list... On 27-11-10 20:08, Daniel P. Brown wrote: > On Sat, Nov 27, 2010 at 14:05, Daniel P. Brown > wrote: > > On Sat, Nov 27, 2010 at 13:55, Asmann, Roland > wrote: > >> > >> $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "\\1", $s); > > > >This i

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Daniel P. Brown
On Sat, Nov 27, 2010 at 14:05, Daniel P. Brown wrote: > On Sat, Nov 27, 2010 at 13:55, Asmann, Roland wrote: >> >> $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "\\1", $s); > >    This is exactly what I meant when I erroneously said, "library." Without seeing the rest of your code, try adjus

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Daniel P. Brown
Please be sure to hit Reply-All so that the list is CC'd on each response as well. On Sat, Nov 27, 2010 at 13:55, Asmann, Roland wrote: > > I'm currently running this on a default XAMPP installation on my PC, > because I was told something similar is running on the server. I thought > this ha

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Daniel P. Brown
On Sat, Nov 27, 2010 at 12:50, Asmann, Roland wrote: > > 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? All we've seen is your

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
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 > > wrote: > > > Hi all, > > > > > > I am playing around with PHP and BBCodes and have found some regex's > > > that should transform my BBCode into correct

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
On 27-11-10 17:24, Daniel P. Brown wrote: > On Sat, Nov 27, 2010 at 08:57, Asmann, Roland > 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 t

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Daniel P. Brown
On Sat, Nov 27, 2010 at 08:57, Asmann, Roland 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 rege