preg_replace help please

From: Date: Thu, 25 Sep 2003 01:18:53 +0000
Subject: preg_replace help please
Groups: php.general 
Request: Send a blank email to php-general+get-163836@lists.php.net to get a copy of this message
this is supposed to any occurrence of *something* into <strong>something</strong> $str = preg_replace("!\*(.*?)\*!"," <strong>\\1</strong>\\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 include newlines... can anyopne help me modify the above to work on multiple lines???? Thanks! Justin

« previous php.general (#163836) next »