- var_dump: documentation ( source)
- preg_replace: documentation ( source)
<?php
$string = "Hello {replace this curley} {{but not this one}} {{{and not this one}}}";
$formatted = preg_replace('/^(?!\\{{2,})(?:[^\\{]*)(\\{{1})(?:[^\\{\\}]*)(\\}{1})$/',"",$string);
var_dump($formatted);