Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::string data {"5020303000182306,,30502,,2,0,,,0"},str = data;
- std::regex re(",,");
- const std::string fmt = ", ,";
- do
- {
- str = std::regex_replace(str,re,fmt,std::regex_constants::match_prev_avail);
- }
- while(std::regex_search(str,re));
- std::cerr << str << std::endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement