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
In reply to Re^2: Regex for replacement
by davido
in thread Regex for replacement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |