On Fri 1-Dec-06 1:59am -0600, A.J.Mechelynck wrote:
> He gave it. In the above case, you highlight not only the 2nd occurrence but
> also the 4th, 6th, etc.
Of course. I was so focused on (1) the "second on the line"
and (2) the "shortest match first algorithm" of non-greedy
constructs (which surprises many users) that I completely
ignored matches starting elsewhere :-( That is:
:%s/home.\{-}\zshome/alone
only changes the second home - no matter how many are on a
line..
Peter's solution to find only the second works everywhere.
To the person who didn't like the \{-} form, use \v:
/\v^.{-}home.{-}\zshome
Sorry Peter and zzapper for the confusion.
--
Best regards,
Bill