- var_dump: documentation ( source)
- preg_replace_callback: documentation ( source)
<?php
$string = "{ccm:export:page:test} is a {ccm:export:page:test}";
var_dump(preg_replace_callback('/\{ccm:export:page:(.+?)\}/i', function(){ return 'test'; }, $string));