$name = $this->name;
$mask = "/(\{$name(\s+[^\}]*)?\})/";
$bits = preg_split($mask, $input, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$output = "";
while($bit = array_shift($bits)) {
$name = $this->name;
$mask = "/(\{$name(\s+[^\}]*)?\})/";
$bits = preg_split($mask, $input, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$output = "";
while($bit = array_shift($bits)) {