找出顺序有元音的单词的数量 [英] find the number of words that have vowels in order

查看:101
本文介绍了找出顺序有元音的单词的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



谁能告诉我如何从包含a,e,i,o,u的特定目录中查找所有单词.

太过分了在这里,"a"之后是"a",然后是"i",然后是"o",然后是"u".元音永不重复.

我有猫/home/user1/tmp/* | grep [aeiou]

但这并没有显示我的预期答案.

请帮忙.

在此先感谢您.

Hi,

Can any one please tell me how to find all words from a particular directory which contains a,e,i,o,u in order.

Ex abstancious. Here ''a'' followed by ''a'' followed by ''i'' followed by ''o'' followed by ''u''. Vowels never repeated.

I have cat /home/user1/tmp/* | grep [aeiou]

But it''s not displaying my expected answer.

Please help.

Thanks in advance.

推荐答案

您的正则表达式只是在寻找任何单个元音.您想要更多类似"^ [^ aeiou] * a [^ aeiou] * e [^ aeiou] * i [^ aeiou] * o [^ aeiou] * u [^ aeiou] *
Your regular expression is just looking for any single vowel. You want something more like "^[^aeiou]*a[^aeiou]*e[^aeiou]*i[^aeiou]*o[^aeiou]*u[^aeiou]*


"我想(假设它必须全部包含).这个搜索零个或多个辅音,a,零个或多个辅音,等等.
" I think (assuming it must have all of them). This one searches for zero or more consonants, a, zero or more consonants, e, etc.


这篇关于找出顺序有元音的单词的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆