On 23 Oct 2008, at 22:32, SysAdm wrote:
>
> Thanks Andrew! Actually, the "timesheet" is part of an email address,
> but I tried it without the angle brackets and it worked great for the
> first occurrence. Unfortunately, when I did "n" for next, it seemed
> to find the next occurrence of "timesheet", then keep highlighting
> through many pages.
> I guess that means, the search needs to only find "timesheet" through
> "Winsock" that are between sections beginning and ending with
> "------".
> Know of a way to add that into the search?
> Thanks again for your help!
> HappyDad
>
More assumptions.... and you know what they say about assuming <grin/>
I'm assuming that the hyphens are on the same line as the 'timesheet' an
'winsock' lines, and start to the left of timesheet, and after the end
of
winsock. You can juggle the positioning if that's different...
/------.*timesheet\_.\{-\}Winsock.*------/
Your problem might have been caused by the presence of a line containing
'timesheet' that was NOT related to the information that you're after.
There needs to be some unambiguous way to select only the starting
occurrence for what you DO want.
If the hyphens are on separate lines from the words, this might be
worth trying:-
/------.*\n.*timesheet\_.\{-\}Winsock.*\n.*------/
regards, Andy
--
Andrew Long
andrew dot long at mac dot com
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---