On Sun, Dec 5, 2010 at 5:04 PM, john york <[email protected]> wrote:
>
> I need to match a whole word witch the match() function.
> For example, I need to know the position of "foo" inside the string :
>
> "not-this-foo foo fooNotGood"
>
> The \<foo\> doesn't seems to work inside the match() function.
> Is there any way to do it ?
:echo match('not-this-foo foo fooNotGood', '\<foo\>')
Returns 13, which is correct:
:echo 'not-this-foo foo fooNotGood'[13:]
You were probably trying to use "\<foo\<", instead of surrounding the regex
with single quotes.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php