good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: perl regex referencingby bruceb3 (Pilgrim) |
on Sep 18, 2007 at 08:18 UTC ( [id://639575]=note: print w/replies, xml ) | Need Help?? |
The back slash is used inside the match and the dollar sign is used outside of the match. In this case "inside the match" refers to (a-z)\1 because the text is being matched against this regex. The dollar 1 is not being matched against. It's part of the substitution.
In Section
Seekers of Perl Wisdom
|
|