I need to make homework and i need to grep all words that alternate vowels and consonants. I know this question has been asked before but the solution given doesn't work for 2 letter combinations like AB.
The command i used almost finds everything and is the only thing that got close, but as mentioned before it doesn't work for everything.
grep -iE "^[aeiou]?([^aeiou][aeiou])+[^aeiou]?$" words.txt
Is there a simple solution to my problem that finds all words alternating vowels and consonants including 2 letter combinations.