> My input looks like this
>
> First_string_1 Second_string_1
> First_string_2 Second_string_2
> ...
> First_string_n Second_string_n
>
> All strings are potentially different, but contain no white spaces or
> non-word/letter characters.
>
> I wish to highlight every occurrence of a certain letter, say 'S', in
> the Second string, but not in the First!
> That is, "For any line in my file that has two strings (separated by
> white space), match and highlight all occurrences of letter X in the
> second string".
I got something that sounds like what you wanted with
\%(^\w\+\s\+\w\{-}\)\@<=S
As a better demo, try it with "n":
\%(^\w\+\s\+\w\{-}\)\@<=n
which should find all 3 "Seco[n]d_stri[n]g_[n]" in your example
data. You should be able to make more complex patterns if you
need...just change the terminal character to your "true" pattern,
such as
\%(^\w\+\s\+\w\{-}\)\@<=[aeiou]
to find vowels in the second word.
I'm assuming your :hl statement was correct...I just used ":set
hls" to find the matches in your email :)
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---