P
pk
Hi!
If I do a search an have parenthesis in the search string, I've got
the "captuered" text in the special variables $1, $2 ... My problem
is: I want to pass the search + replace-text as variables and work
with the "captured" text (some user enters the search- +
replace-text); for exampel like that:
$serach_string = "(.*)XXX(.*);
$replace_string = "$1---$1";
$line =~ /$serach_string/;
$new_line = $replace_string;
If $line would be aaaXXXbbb , $new_line should be aaa---bbb .
But I can't use $1 etc. Is there any possibility to get the "captured"
text?
pk
If I do a search an have parenthesis in the search string, I've got
the "captuered" text in the special variables $1, $2 ... My problem
is: I want to pass the search + replace-text as variables and work
with the "captured" text (some user enters the search- +
replace-text); for exampel like that:
$serach_string = "(.*)XXX(.*);
$replace_string = "$1---$1";
$line =~ /$serach_string/;
$new_line = $replace_string;
If $line would be aaaXXXbbb , $new_line should be aaa---bbb .
But I can't use $1 etc. Is there any possibility to get the "captured"
text?
pk