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