in reply to Retrieve second occurrence and everything afterwards using regex
But what is wrong with concatenating the $website variable to the result?use strict; use warnings; my $regex = "\\default\\main\\TSDEMO\\WORKAREA\\tsdemo_intranet\\TSDE +MO\\images\\corner"; my $website = "TSDEMO"; $regex =~ m/($website.*)(?=\\$website)/gi; my $parent = $'; print "$parent\n";
|
|---|