MT#12985 prevent ambiguity in rwr replace pattern

see http://perldoc.perl.org/perlre.html#Warning-on-\1-Instead-of-$1

Change-Id: I36dfa6cda570a4aef7da6ccc19e1d296c16f00c2
changes/27/2527/3
Gerhard Jungwirth 10 years ago
parent eb22009b4f
commit c9380e61dd

@ -1242,7 +1242,7 @@ sub apply_rewrite {
$match = [ $match ] if(ref $match ne "ARRAY");
$replace = shift @{ $replace } if(ref $replace eq "ARRAY");
$replace =~ s/\\(\d{1})/\$$1/g;
$replace =~ s/\\(\d{1})/\${$1}/g;
$replace =~ s/\"/\\"/g;
$replace = qq{"$replace"};

Loading…
Cancel
Save