码迷,mamicode.com
首页 > 编程语言 > 详细

Java正则表达式, 提取双引号中间的部分

时间:2015-04-03 17:04:13      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

String str="this is \"Tom\" and \"Eric\", this is \"Bruce lee\", he is a chinese, name is \"李小龙\"。";
            Pattern p=Pattern.compile("\"(.*?)\"");
            Matcher m=p.matcher(str);
            while(m.find()){
                System.out.println(m.group());
            }

  

Java正则表达式, 提取双引号中间的部分

标签:

原文地址:http://www.cnblogs.com/hark0623/p/4390316.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!