in reply to Pass Matched Variable into Regex Replace Variable
A thorough discussion of this topic can be found along links from Re: Evaluating $1 construct in literal replacement expression.