in reply to Regex for replacement

Misread the question earlier.

English is not my mother language

s{.+(?=/main)}{what ever u need}g;

Replies are listed 'Best First'.
Re^2: Regex for replacement
by davido (Cardinal) on Jul 08, 2004 at 07:02 UTC
    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