#include <iostream>
#include <string>
#include <regex>
#include <iterator>

int main()
{
  std::string cookieStr = "tgw_l7_route=d0bf4a9ab78d53762b596c0a48dabcdf; Expires=Thu, 03-May-2018 11:42:51 GMT; Path=/, session=a1d25e28-0084-421d-ae71-9ae18c7f6b50; Expires=Sun, 03-Jun-2018 10:42:51 GMT; HttpOnly; Path=/";
  std::regex rgx("(?=, [^ ]+=)");
  std::sregex_token_iterator iter(cookieStr.begin(),
    cookieStr.end(),
    rgx,
    -1);
  std::sregex_token_iterator end;
  for ( ; iter != end; ++iter)
    std::cout << *iter << '\n';
  return 0;
}