codice:
echo preg_replace("#{REWRITE='(.*?)'}#", "$1", $string);
Le graffe non vanno quotate.