It looks for zero or more consonants ([^aieou]*) followed by 5 to 7 vowels (([aieou]){5,7}) followed by zero or more consonants ([^aieou]*). The entire regular expression is anchored to the beginning of the line (^) and the ending, ($).

Example

$ egrep '^([^aieou]*[aieou]){5,7}[^aieou]*$' \
        /usr/share/dict/words | head -10
abacinate
abacination
abacterial
abaisance
abalation
abalienate
abalienated
abalienating
abalienation
abandonable


Details

So when it matches say this first word, abacinate, the first letter a has 0 consonants to the left, so we match that part.

As additional vowels with either zero or more consonants are found on the left and/or right, we match those situations too. If we find 5 to 7 of them, then we match.

Help understanding an egrep expression
I am trying to show that $[A,B^n] = nB^{n-1}[A,B]$ where A and B are two Hermitian operators that commute with their commutator. However, I am running into a little problem and would like a hint of how to proceed.

If A and B commute then $[A,B] = ABA^{-1}B^{-1} = e$ where e is the identity element of the group.

$$\therefore AB=BA$$

$$n=1; [A,B^1] = (1)B^0[A,B] = e$$
This statement is certainly true. however moving on to $n = 2$ I find...

$$[A,B^2] = AB^2A^{-1}B^{-2} = ABBA^{-1}B^{-1}B^{-1} = BBAA^{-1}B^{-1}B^{-1}$$

Where in the last step I have used the fact that A and B commute to rearange the terms. However, it is plain to see that this last term simply reduces to the identity as well and for the n = 2 case we have:

$$[A,B^2] = e \ne 2B[A,B] = 2Be = 2B$$

Clearly I have assumed something I shouldn't have. The fact that there is a multiplicative factor of n implies I should be adding things, but I thought if I kept it as general as possible, the answer should just fall out naturally. I don't want an answer please, only guidance.
