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, "");
text = text.replaceAll(TRAILINGZERO, "$1$2");