#include <iostream>
#include <iterator>
#include <regex>
#include <string>
int main()
{
std::string text = "Miguel de Cervantes, Don Quixote, Spain, 9.99, 1612, The story follows a Hidalgo, Alonso Quixano, who proves that chivalry will in fact never die.";
std::regex vowel_re(",\\s+");
std::cout << '\n' << std::regex_replace(text, vowel_re, ",") << '\n';
}
Output
Miguel de Cervantes,Don Quixote,Spain,9.99,1612,The story follows a Hidalgo,Alonso Quixano,who proves that chivalry will in fact never die.
Регулярное выражение, которое я использовал, было ,\\s+
то есть запятая, за которой следуют многие пробелы.
Note: Thank you! Because of you i wrote C++ after 5 years!