<div id="logotype">
=icon:#logotype_mini:logotype_mini.svg
...
$pattern = "/=icon:((#|\.\w+)|):((\w+)\.(\w+))/";
$callback = function ($m) {
return trim($m);
};
echo preg_replace_callback($pattern, $callback, '=icon:#logotype_mini:logotype_mini.svg');