Reputation: 5331
With the help of this post, I am able to search for the words containing combinations of all vowels letter.
regex:
(?=\w*a)(?=\w*e)(?=\w*i)(?=\w*o)(?=\w*u)\w+
matches example:
abstemious
education
reputation
facetious
I then change the following into vim expression as
regex:
\(\ze\w\{-}a\)\(\ze\w\{-}e\)\(\ze\w\{-}i\)\(\ze\w\{-}o\)\(\ze\w\{-}u\)\w\+
changes are
( to \(
?= to \ze
* to \{-}
+ to \+
But now it only matches serial occurrences like
abstemious
facetious
not education,reputation
where do I missed?
Upvotes: 4
Views: 107
Reputation: 195039
This vim-regex should help you:
\v(\w{-}a)@=(\w{-}e)@=(\w{-}i)@=(\w{-}o)@=(\w{-}u)@=\w+
\v
means match in very-magic mode, :h magic
for details(...)\@=
, :h \@=
for detailsUpvotes: 7