📅  最后修改于: 2022-03-11 14:44:51.486000             🧑  作者: Mango
#include
#include
std::string test = "abc def abc def";
test = std::regex_replace(test, std::regex("def"), "klm"); // replace 'def' -> 'klm'
// test = "abc klm abc klm"