Dear Vim users,
I have a pretty simple proposal for vim regexps:
it should probably be pretty doable to add a possibility for \{ }
("count") items.
The idea is to provide different values separated by semicolumns (or
whatever else).
I'll explain myself with an example, which is often the best way to do:
a\{2;4} would match aa or aaaa (greedy)
\<\w\{1,3;6,8}\> would match words of length 1, 2, 3, 6, 7 or 8
(greediness non relevant here)
\<\d\{-1,3;5;7;11;13;17;19}0 would match numbers where we can find a
prime (smaller than 20) number of beginning digits immediately
followed by a zero (non-greedy). Example (match in brackets):
[123450] and [1230]50
Don't ask for the usefulness of the last example...
Would you be keen on that ? If so, I can try to look into Vim's code
(but I never did that, although I can do a little bit of C).
I did not find any such existing feature, but if it exists already, I
apologise...
Cheers,
--
Romain Chossart
--
You received this message from the "vim_dev" 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