I read line from txt file. How i can parse this line :
shop "The best shop" "2006"
to array of strings ?
For example:
 array[0] = [shop]
 array[1] = [The best shop] 
 array[2] = [2006]
Without double quotes and spaces ?
I read line from txt file. How i can parse this line :
shop "The best shop" "2006"
to array of strings ?
For example:
 array[0] = [shop]
 array[1] = [The best shop] 
 array[2] = [2006]
Without double quotes and spaces ?
 
    
     
    
        String shop = "shop \"The best shop\" \"2006\"";
    String[] tokens = shop.split(" \"");
    for (int i = 0; i < tokens.length; i++) {
        tokens[i] = tokens[i].replace("\"", "");
        System.out.println("array[" + i + "] = [" + tokens[i] + "]");
    }
But this is for this line only :)
