Re: [PHP] preg_replace help please

2003-09-24 Thread John W. Holmes
Justin French wrote: this is supposed to any occurrence of *something* into something $str = preg_replace("!\*(.*?)\*!"," \\1\\2",$str); it works fine on single lines, but it breaks when there's a \n (and perhaps other white spaces?) in the string, eg: *something with a newline* I think this i

[PHP] preg_replace help please

2003-09-24 Thread Justin French
this is supposed to any occurrence of *something* into something $str = preg_replace("!\*(.*?)\*!"," \\1\\2",$str); it works fine on single lines, but it breaks when there's a \n (and perhaps other white spaces?) in the string, eg: *something with a newline* I think this is because .*? doesn't