I\'d like to change with
. and
with
I\'m having problem with t
You could just use str_replace:
$str = str_replace(array('', '
'), array('', '
'), $str);
If you feel compelled to use regexp:
$str = preg_replace("~<(/)?pre>~", "<\\1code>", $str);
If you want to replace them separately:
$str = preg_replace("~~", '', $str);
$str = preg_replace("~
~", '
', $str);
You just need to escape that slash.