At the end of http://www.tei-c.org/release/doc/tei-p5-doc/en/html/SA.html#SACR it states: "If there is a need for an actual string including a dollar sign followed by a digit that is not supposed to be replaced, the dollar sign should be written as %24." This is problematic because '$' is a reserved character according to RFC 3986. It's a so-called "sub-delimiter" (though not a commonly used one). What this means is that '$' in a URI will not necessarily be treated the same as '%24', and so we shouldn't recommend that substitution.
It would be better either to escape the '$' the way most regex processors do, as '\$' or '$$', or to use '\1', '\2' etc. to reference capturing groups and recommend escaping that as '%5C'.