--- Bill McCarthy <[EMAIL PROTECTED]> wrote:
> On Thu 30-Nov-06 9:20pm -0600, Peter Hodge wrote:
>
> > Try:
> >
> > /^.\{-}home.\{-}\zshome
> >
> >
> > for your reference:
> >
> > \{-} makes the '.' match as little as possible
> > \zs makes the search match begin at this point in the pattern
>
> One might think so, but also note:
>
> :help non-greedy
>
> In particular, ready the sentence starting with "BUT". All
> that is needed is:
>
> /home.\{-}\zshome
>
> Earliest is preferred to shortest.
Yes, but that could also match a 3rd or 4th or 5th occurance of 'home' in one
line, so it's slightly safer to anchor the pattern to the start of the line.
regards,
Peter
Send instant messages to your online friends http://au.messenger.yahoo.com