Here is my text:
$msg_text = '[quote]TEXT[/quote]';
and my preg_replace:
$msg_text = preg_replace('#\[quote\](.*?)\[\/quote\]#is', '"$1"'."\r\n", $msg_text);
And it works great. But what when my text looks like this:
$msg_text = '[quote]TEXT [quote]TEXT[/quote][/quote]';
?? In this example, my preg_replace is not working. How can I replace this text in all cases?
source
share