I know there are similar questions, however the last question only stated if a word has all of the vowels in the word. What I am trying to do is find if a word has its vowels in alphabetical order. For example the words: almost, various, etc.
I have tried many different solutions however I cannot get to this work.
Things like:
(a[^eiou]*)?(e[^aiou]*)?(i[^aeou]*)?(o[^aeio]*u)?
and
a[^eiou]*e[^aiou]*i[^aeou]*o[^aeio]*u
but these do not work.
Your first try is not too far, try this:
See it here on Regexr.
I added:
\bword boundaries to ensure that the complete word is matched[^aeiou]*at the beginning to match non vowels before the first “a”(?:o[^aeio]*)?u?changed the last part a bit to make the “o” optional