Wednesday, April 27, 2011

RE: arithmetic expressions in search

googler wrote:
> I have a file where I have words like X1, X2, ..., X16, X17, X18, ....
> I want to find out occurences of words containing a number
> greater than, say, 17. So basically, I want to find X18, X19,
> X20, etc. How can I do this in vim? In other words, can we
> use arithmetic expressions in search? If yes, how?

I believe there is no way to search for a number depending on an
expression. You would have to do it manually, something like
this simple effort:

/X1[89]\|X[2-9][0-9]

John

--
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

No comments:

Post a Comment