in reply to Re: regexp find last word
in thread regexp find last word

or s/(fox(?:(?!fox).)*forest)/the $1/;

Update: nm, capture makes it slower.