s/.*internet(.*)\/WORKAREA\$iwmount\/internet$1\/STAGING/gi;
s#.*internet(.*)/WORKAREA#$iwmount/internet$1/STAGING#gi;
But Tom, escaped backslashes are just soooo much more readable than another delimiter.
$**** =~ s{^.*internet(.*)/WORKAREA} {$iwmount/internet$1/STAGING}xsmgi;
Thanks all for your suggestions (especially the ones on making it more readable) s/.*\/(Applications)(.*)\/WORKAREA.*/$iwmount\/$1$2\/EDITION/gi;
Obviously you did not pay much attention to the readability part.s|.*/(Applications)(.*)/WORKAREA.*|$iwmount/$1$2\/EDITION|gi;I like vertical bars as delimiters. Adam likes curly braces. Something other than slash is important to use for readability
s{^(.*/)(??:WORKAREA|EDITION)/[^/]+|STAGING).*$}{$iwmount$1/EDITION};