Hello,
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
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
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
Thanks for the reply
Reply to message «Re: arithmetic expressions in search»,
sent 22:33:21 27 April 2011, Wednesday
by googler:
Thanks for the reply. But it may not always be simple like you showed
above. For example, if I wanted to only search for those numbers that
are divisible by 7. If such a feature
On 04/27/2011 01:59 PM, ZyX wrote:
Normally you do the following: create a regular expression
that is able to find all numbers and then write additional
code which will filter the results of the first search so that
only numbers divisible by 7 are left.
I must say that there are times I've