fork download
  1. #include <iostream>
  2. #include <regex>
  3. int main() {
  4. std::string name = "regex101: build, test, and debug regex - 3 running windows";
  5. std::regex regexp(R"((.*) -\s+\d+\srunning.*)");
  6. name = std::regex_replace(name, regexp, "$1");
  7. std::cout << name << std::endl;
  8. return 0;
  9. }
Success #stdin #stdout 0.01s 5512KB
stdin
Standard input is empty
stdout
regex101: build, test, and debug regex