in reply to Re: Regex for replacementin thread Regex for replacement
s{.+(?=/main)}{what ever u need}g;
This solution still doesn't preserve the /abc/, as the OP stated was a requirement. I don't see the need for the /g modifier either.
Dave