#include <iostream>
#include <regex>
using namespace std;

int main() {
	std::string inputStr("apple with make,up things $312,412,3.00");
	std::regex numRegex(R"((\d),(?=\d))"); 
    std::cout << regex_replace(inputStr, numRegex, "$1") << "\n";
	return 0;
}