{
StringBuffer out = new StringBuffer();
Matcher m = SYNTHETICS.matcher(text);
while(m.find())
{
m.appendReplacement(out, synthetic_replacement(m).replace("$", "\\$"));
}
m.appendTail(out);
text = out.toString();
text = text.replaceAll(TRAILING, "");