You have to use preg_replace_callback:
$content = '{{include:rec_ABXtI504839d1a607c1MI}}';
$content_smart_linked = preg_replace_callback('/\{\{ ?include:([a-zA-Z0-9_]{25}) ?\}\}/i',
function($matches) {
return '<a href="' . escapeContent($matches[1]) . '">{{include:'.$matches[1].'}}</a>';
},
$content);
echo $content_smart_linked;
Otherwise you need to use the DEPRECATED "\e"
modifier which is highly not recommended (E_DEPRECATED will be emitted).