最近开始接触“正则表达式",现有一题目向各位大侠请教,如下:试用正则表达式: (?i)((^[aeiou])|(\s+[aeiou]))\w+?[aeiou]\b
匹配字符串“Arline ate eight apples and one orange while Anita hadn't any”。
(注:《JAVA编程思想》中的题目,期待您的指教!)
匹配字符串“Arline ate eight apples and one orange while Anita hadn't any”。
(注:《JAVA编程思想》中的题目,期待您的指教!)
楼主【hesouxiang】截止到2008-08-02 20:57:53的历史汇总数据(不包括此帖):
发帖的总数量:15 发帖的总分数:240 每贴平均分数:16
回帖的总数量:17 得分贴总数量:2 回帖的得分率:11%
结贴的总数量:11 结贴的总分数:180
无满意结贴数:0 无满意结贴分:0
未结的帖子数:4 未结的总分数:60
结贴的百分比:73.33 % 结分的百分比:75.00 %
无满意结贴率:0.00 % 无满意结分率:0.00 %
楼主加油
取消马甲机器人,请点这里:http://www.java2000.net/mycsdn/robotStop.jsp?usern=hesouxiang
Matcher m=p.matcher("Arline ate eight apples and one orange while Anita hadn't any");
while (m.find())
System.out.println(m.group());
这个还是比较容易理解的,只要学过正则表达式的,把它的层次理清楚了就能明白
ate from 6 to 10
one from 27 to 31
orange from 31 to 38
Anita from 44 to 50