Using escaped_list_separator with boost split
I am playing around with the boost strings library and have just come across the awesome simplicity of the split method. string delimiters = ","; string str = "string, with, comma, delimited, tokens, \"and delimiters, inside a quote\""; // If we didn't care about delimiter characters within a quoted section we could us vector<string> tokens; boost::split(tokens, str, boost::is_any_of(delimiters)); // gives the wrong result: tokens = {"string", " with", " comma", " delimited", " tokens", "\"and delimiters", " inside a quote\""} Which would be nice and concise... however it doesn't seem to work