but hat's not the problem. I just know the meaning of $ in regexes and ther is no "Illegal Group Reference" Problem. The solutions in the thread you posted are using the "appendReplacement()" function of a Matcher as i do in my sample code. I know that - but i would like to do it in one line with the replaceAll() ...