#!/usr/bin/perl use strict; use warnings; $_ = q{some search criteria}; s/(s)(o)(m)(e)( )search criteria/$1$2${3}2010$4$5/g; print;
See Regexp Quote Like Operators for details on regular expression interpolation.
In reply to Re: backreference followed by literal in regex substitution
by kennethk
in thread backreference followed by literal in regex substitution
by jayw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |