String line = "hello world, how are, \"we today, are we ok\", la la al"; StringTokenizer tokenizer = new StringTokenizer(line, ",\"", true); while (tokenizer.hasMoreTokens()) { String token = com.pjaol.ifodder.storage.StringUtils.getNextToken(tokenizer); System.out.println("Token = " + token); }