Re: [PHP] preg_replace pain!

2001-01-18 Thread Shaun Thomas
On Thu, 18 Jan 2001, Christian Reiniger wrote: > On Thursday 18 January 2001 07:40, Nicholas Pappas wrote: > > > I was hoping someone could help me with this regular expression... > > > > $pattern = "/\[b\](.*)\[\/b\]/Ui"; > > $message = preg_replace($pattern, "\\1", $message); > > >

Re: [PHP] preg_replace pain!

2001-01-18 Thread Christian Reiniger
On Thursday 18 January 2001 07:40, Nicholas Pappas wrote: > I was hoping someone could help me with this regular expression... > > $pattern = "/\[b\](.*)\[\/b\]/Ui"; > $message = preg_replace($pattern, "\\1", $message); > > The above works for: > [b]bold text[/b] > >

RE: [PHP] preg_replace pain!

2001-01-17 Thread Maxim Maletsky
maybe : $pattern = "/\[b\]([.\n]*)\[\/b\]/Ui";. have you tried it succesfully? P.S: I am not sure that \n in preg is a newline, you could also try this: $pattern = "/\[b\]([.".chr(10).chr(13)."]*)\[\/b\]/Ui";. one of these ... Cheers, Maxim Maletsky -Original Message- From: