check if string contains specified sequence
843785Jan 26 2009 — edited Jan 27 2009I'd like to check whether some input string is monsyllabic or not. Easiest way to go would be to check if the sequence 'vowel-consonant-vowel' is in the string. Since there of course can be multiple consonants in between, this has to be taken into account.
I could imagine doing this by first specifiying what a vowel and a cons. is, then taking the input string and use some sort of contains method. In the java tutorials the contains method is said to take an object, but how can I make this object this sequence I want to check for?
Anyone any ideas on how to write this in code, or any ideas/suggestions?
Thanks.