<?php echo preg_replace('`{([^{}]*{[^{}]*}[^{}]*)+}`', '<$0>', 'test {a} {b{c}d}e{{f}{g}}');
You have javascript disabled. You will not be able to edit any code.