java - Delimited string between quotes? -


i have text file, , need read out double quoted strings. trying split() method, didn't want. example:

"000abcd",000,hu,4614.850n,02005.483e,80.0m,5,160,1185.0m,,005,4619.650n,01958.400e,87.0m,1... 

in example, need string 000abcd. ideas?

try this

    string str="\"000abcd\",000,hu,4614.850n,02005.483e,80.0m,5,160,1185.0m,,005,4619.650n,01958.400e,87.0m,1";     pattern p = pattern.compile("\"(.*?)\"");     matcher m = p.matcher(str);     while (m.find()) {                              system.out.println(m.group(1));     } 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -