in reply to Retrieve second occurrence and everything afterwards using regex
if u wish you can change your regex as follows
output:use strict; use warnings; my $regex = "\\default\\main\\TSDEMO\\WORKAREA\\tsdemo_intranet\\TSDEM +O\\images\\corner"; my $website = "TSDEMO"; $regex =~ /(.*)($website)(.*?)(\2.*)$/g; my $parent = $4; print "$parent\n";
TSDEMO\images\corner
regards,
Senthil Kumar.k
|
|---|