user10547478
user10547478

Reputation:

How to find words that contain at least five consecutive vowels

I have a file filled with English words. Now I need to find the lines with at least five consecutive vowels in it. How do I do this using grep?

Upvotes: 0

Views: 593

Answers (1)

Benjamin W.
Benjamin W.

Reputation: 52291

You can use

grep '[aeiou]\{5\}' infile

This uses a bracket expression to match any vowel, and then looks for lines that have that repeated five times.

If the matching is supposed to be case insensitive:

grep -i '[aeiou]\{5\}' infile

Upvotes: 4

Related Questions