in reply to Regular expressions Containing Octal values?

You'll need to distinguish the \1 from the following 2. A few ideas come to mind:

-- Randal L. Schwartz, Perl hacker


update: And these are all great solutions if we're talking about the regex part of the substitution, but the original questioner was asking about the replacement part. Gah.

In that case, just use ${1} instead. Shouldn't have been using \1 in the first place. {grin}