Re: Finding all words

Tim Chase <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
On 2024-10-03 15:09, Mikhail Velikikh wrote:
> > Is there a way to compose a regular expression in Vim that will find all
> > the words I want, irrespective of the order in which they occur? 
> 
> I would use something like this:
> \v<(quick|brown|lazy|jumps)>

That finds *any* of the words, not *all* of the words as the OP requested.

While the implementation can often end up slow if you have a large
text or lots of find-them-all terms, you (OP) can use

   :help /\&

to join the conditions like

    /.\{-}quick\&.\{-}brown\&.\{-}lazy\&.\{-}jumps/

-tim





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

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zv6nnfKqWolaBkMm%40thechases.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.