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正则表达式, 提取双引号中间的部分的更多相关文章

  1. java 正则表达式提取html纯文本

    本文来自我的个人博客: java 正则表达式提取html纯文本 做内容的大家都知道,从html中直接提取纯文本是一个非常大的问题.现将我做的正则匹配贴上: import java.util.regex ...

  2. java正则表达式提取地址中的ip和端口号

    由于我需要用到java正则表达式提取地址中的ip和端口号,所以我就写了一个demo,测试一下,下面是demo public class Test0810_1 { public static void ...

  3. vim 正则表达式获取双引号中的字符

    vim 正则表达式获取双引号中的字符   1.获取双引号中的字符 :%s/.*\".∗\".*/\1/ 2.用字符串建立标签 如 hello  <hello></ ...

  4. java和javascript双引号嵌套的问题

    双引号不能嵌套双引号,否则一对双引号就结束了. java中双引号中嵌套双引号需要转义: /** * java双引号转义符测试 * @author asus * */ public static voi ...

  5. 使用Java正则表达式提取字符串中的数字一例

    直接上代码: String reg = "\\D+(\\d+)$"; //提取字符串末尾的数字:封妖塔守卫71 == >> 71 String s = monster. ...

  6. C#提取双引号中的字符串

    public static void Main(string[] args) { string strtmp = "123\"456\"qqq\"789\&qu ...

  7. Java 正则表达式提取标签中的属性(src 连接地址)等

    public class Test { public static void main(String[] args) { String source = "<p><img ...

  8. C#正则表达式匹配双引号

    html: <img class="bubble large" src="/images/hero-logos/cog.svg" width=" ...

  9. java 正则表达式提取价格

    实例代码: public static void main(String[] args) { String str="11000.00元"; Pattern pattern = P ...

随机推荐

  1. Ubuntu技巧之 is not in the sudoers file解决方法

    转自:http://www.linuxidc.com/Linux/2010-12/30386.htm 1)进入到root用户下. 2)添加文件的写权限.也就是输入命令"chmod u+w / ...

  2. HDU 4864 Task (贪心+STL多集(二分)+邻接表存储)(杭电多校训练赛第一场1004)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4864 解题报告:有n台机器用来完成m个任务,每个任务有一个难度值和一个需要完成的时间,每台机器有一个可 ...

  3. [codeforces 549]G. Happy Line

    [codeforces 549]G. Happy Line 试题描述 Do you like summer? Residents of Berland do. They especially love ...

  4. haartraining生成.xml过程

    继续向大神学习http://www.cnblogs.com/tornadomeet/archive/2012/03/28/2420936.html

  5. Linux Apache prefork和worker的原理详解

    prefork(多进程,每个进程产生子进程)和worker(多进程,每个进程生成多个线程)    prefork的工作原理是,控制进程在最初建立“StartServers”个子进程后,为了满足MinS ...

  6. HDOJ 1102 生成树

    Constructing Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Other ...

  7. 静态资源[org.springframework.web.servlet.PageNotFound]

    springmvc 无法访问js.css.jpg等资源文件,tomcat启动报警告如下 [org.springframework.web.servlet.PageNotFound] - No mapp ...

  8. How to: Set up Openswan L2TP VPN Server on CentOS 6

    Have you ever wanted to set up your own VPN server? By following the steps below, you can set up you ...

  9. ios如何生成crash报告

    #include <signal.h> #include <execinfo.h> void OnProcessExceptionHandler(int sigl) { do ...

  10. 如何在android的mk文件添加依赖已经编译好的库

    用$(MY_LIB)是代表你的库的所在目录,目录结构是这样 MY_LIB |---include |-----xxx.h |-----xxx.h |---lib |----MYLIB.a LOCAL_ ...