search for: ayaaiea

Displaying 1 result from an estimated 1 matches for "ayaaiea".

Did you mean: aaaiea
2008 Feb 03
4
Extract vowels and consonants using Ruby Regex
...> aaaiea >> "Mary had a little lamb".consonants => mryhdlttllmb However, the regex does not accommodate the conditional treatment of ''y'' as a vowel *if there is no other vowel before or after it.* If properly implemented, the previous examples would return: ayaaiea (vowels) and mrhdlttllmb (consonants). According to this post (http://www.perlmonks.org/?node_id=592867), this could be accommodated in Perl using "zero-width negative-look- behind" and "zero-width negative-look-ahead" assertions as follows: my @vowels = ( /[aeiou]|(?<![ae...