Help for this page
my $string = 'Hello sailor'; my $regex = 'Hello (.*)'; ... $string =~ s/$regex/Goodbye $1/; print "string is now <$string> \n";
/usr/bin/perl -w /tmp/regex.pl string is now <Goodbye sailor>