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
In reply to Re: Retrieve second occurrence and everything afterwards using regex
by perlsen
in thread Retrieve second occurrence and everything afterwards using regex
by luked
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |