After parsing a file and extracting the following line-
my $string = "hello $1";
# print $string = 'hello $1
I would like to apply this string as a regexp replacement. For example-
if ("good morning all" =~ /good morning (\w+)/) {
print $string;
# I would like to be written 'hello world add'
}
In reply to Extracting regex from string by mleshin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |