`
xiaoyu1985ban
  • 浏览: 130320 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

正则表达式的贪婪模式

阅读更多
Pattern p = Pattern.compile("[0-9]\\.[\u4e00-\u9fa5]*");
Matcher m = p.matcher('1.做法2.炒菜3.吃饭');
StringBuffer methodWithBR = new StringBuffer();
while(m.find()){
     System.out.println(m.group());
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics