my $str = "//111.11.112.12/abc/main/myfolder/docs"; $str =~ s[^.+?(/\w+?/main.*)$][whatever$1]; [download]
In reply to Re: Regex for replacement by ercparker in thread Regex for replacement by Anonymous Monk