Though http://help.mp3tag.de/main_scripting.html says
in fact if repl contains $ or \ followed by a digit, the function does not replace by repl. Instead it replaces by repl with \1 and $1 expanded to the string matching the first expr subexpression, \2 and $2 to the string matching the second expr subexpression, etc.
This effect can cause repl to fail to match literal $ and .
I suggest the help be amended to cover this, and to state the official escape method for repl literal $ and . Thanks.