fork(63) download
  1. #include <iostream>
  2. #include <regex>
  3. using namespace std;
  4.  
  5. int main() {
  6. string a ="hello";
  7. string b = "Fellow $<world>$, full of $<smart>$ people";
  8. std::cout<<std::regex_replace(b, std::regex(R"(\$<[^<>]*>\$)"), a);
  9. return 0;
  10. }
Success #stdin #stdout 0s 3504KB
stdin
Standard input is empty
stdout
Fellow hello, full of hello people