On Jan 16, 2008 8:03 PM, Wolfgang NáÅasi-Donner <ed.odanow / wonado.de> wrote: > Rick Denatale wrote: > > Something like this? > > irb(main):001:0> "frabelious" =~ /a.*?e.*?i.*?o.*?u/ > > => 2 > > This doesn't work as expected... > > irb(main):001:0> "xaxxixxexxixxuxxoxxuxx".match(/a.*?e.*?i.*?o.*?u/)[0] > => "axxixxexxixxuxxoxxu" > > ..., because it allows all wovels in any order in the word, if there is > one possible grouping with the wanted ordering - The subpattern "a.*?e" > for example allows any number of "a"s, "i"s, "o"s, and "u"s between the > "a" and the "e". > > Wolfgang NáÅasi-Donner > -- > > Posted via http://www.ruby-forum.com/. > > try something like: /a+[^a]*e+[^ae]*i+[^aei]*o+[^aeio]*u+/