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
Post a Comment