#include <iostream>
#include <string>

#include <boost/tokenizer.hpp>

int main() {
    std::wstring str = L"2	 , 14	33	50	 \"AAA BBB\"";
    
    std::wstring escSep(L"\\");//escape character
    std::wstring delim(L" \t\r\n,");//split on spaces, tabs, new lines, commas
    std::wstring quotes(L"\"");//allow double-quoted values with delimiters within

    boost::escaped_list_separator<wchar_t> separator(escSep, delim, quotes);
    boost::tokenizer<boost::escaped_list_separator<wchar_t>, std::wstring::const_iterator, std::wstring> tok(str, separator);

    for(auto beg=tok.begin(); beg!=tok.end();++beg)
        std::wcout << *beg << std::endl;
        
    return 0;
}