还真都会,就我不会
悟空也烦恼 2011-04-01 08:51:00 String input = "Arline ate eight apples and one orange while Anita hadn't any";
String regex = "(?i)((^[aeiou])|(\\s+[aeiou]))\\w+?[aeiou]\\b"
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(input);
while (m.find())
System.out.println(m.group());
输出:
Arline
ate
one
orange
Anita
这个正则 开始的时候(?i)什么意思哈,为什么开头没有i的也有输出?求分析