fork(3) download
  1. #include <iostream>
  2. #include <regex>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::regex reg(".*");
  7. std::string s = "the string";
  8. std::cout << std::regex_replace(s, reg, "whatevs", std::regex_constants::match_not_null) << std::endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3500KB
stdin
Standard input is empty
stdout
whatevs