Reply to thread

Complex




Im still looking into your question, but at first pass my answer is that it will be difficult to find a regular expression that will find all five vowels in any order with one expression.  There are 5 vowels, aeiou, and if you arrange them in all possible orders that would be a permutation of 5 things taken 5 at a time.  That amounts to 120 possible unique orderings of the 5 vowels.  You could use the expression below:


[aeiou].*[aeiou].*[aeiou].*[aeiou].*[aeiou]


but that will also find "aaaaa", "aaaoo", and so forth.  You could use the one below:


[a].*[e].*.*[o].*


but that finds one unique permutation, and there are 120 unique permutations.  Right now I cant think of one regular expression that will find all five vowels in any order.  If I think of or stumble across one I will reply.  Perhaps someone else has somethoughts on this?    :confused:


Back
Top