I need to parse the line from the stream that would look like this: command "string1" "string2" string can contain spaces and escaped double-quotes. I need to split it so that I get command, string1 and string2 as array elements. I think split() with regex matching " but not " ( .split("(?<!\\)"") ) would do the job, but I hear that that is not a good idea. What's the best way to do that in Java?
