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

That just puts 'the' in front of the last fox, without considering the forest at all. It doesn't put 'the' in front of the last fox before a forest, except when that also happens to be the last fox on the line. That is, it will turn
fox comes and fox goes into the forest. No fox left
into
fox comes and fox goes into the forest. No the fox left

Replies are listed 'Best First'.
Re^3: regexp find last word
by Fletch (Bishop) on Mar 02, 2005 at 15:04 UTC

    What, you mean he didn't see the forrest for the thes?

Re^3: regexp find last word
by borisz (Canon) on Mar 02, 2005 at 15:03 UTC
    Thats right, I was just to lazy to reverse forest.* as well. But the idea is to reverse the string and replace the first.
    Boris