#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"));
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxyZWdleD4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHZlY3Rvcj4KIAp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJY29uc3QgYXV0byBzdHIgPSAiVGhlICxxdVxcLGljayAsXHRicm93biwgZm94InM7CgogICAgY29uc3QgcmVnZXggcmV7ICJcXHMqKCg/OlteXFxcXCxdfFxcXFwuKSo/KVxccyooPzosfCQpIiB9OwogICAgY29uc3QgdmVjdG9yPHN0cmluZz4gdG9rZW5zeyBzcmVnZXhfdG9rZW5faXRlcmF0b3IoY2JlZ2luKHN0ciksIGNlbmQoc3RyKSwgcmUsIDEpLCBzcmVnZXhfdG9rZW5faXRlcmF0b3IoKSB9OwogCgljb3B5KGNiZWdpbih0b2tlbnMpLCBjZW5kKHRva2VucyksIG9zdHJlYW1faXRlcmF0b3I8c3RyaW5nPihjb3V0LCAiXG4iKSk7Cn0=