<?php
$line="This is the first test paragraph.{@font-face:Garamond}";
$line=preg_replace_callback('/\[([\w\s]*)\]{([\w\s\\@:=\'"-\.;^}]*)}/',
function($match){
$inline=new Element('span');
$inline->html($match[1]);
$this->_applyDeclaration($inline,$match[2]);
return $inline;
},
$line);
echo $line;