#include <algorithm>
#include <iostream>
#include <iterator>
#include <regex>
#include <string>
#include <vector>
 
using namespace std;
 
int main() {
	const auto str = "The ,qu\\,ick ,\tbrown, fox"s;

    const regex re{ "\\s*((?:[^\\\\,]|\\\\.)*?)\\s*(?:,|$)" };
    const vector<string> tokens{ sregex_token_iterator(cbegin(str), cend(str), re, 1), sregex_token_iterator() };
 
	copy(cbegin(tokens), cend(tokens), ostream_iterator<string>(cout, "\n"));
}