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
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
2 matches
Mail list logo