fork(2) download
  1. #include <regex>
  2. #include <string>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main() {
  7. string texto = "gabriel = 1.73,derp = 1.80,";
  8. regex padrao("gabriel = (.*?),");
  9. cout << regex_replace(texto, padrao, "gabriel = 1.75,");
  10. return 0;
  11. }
Success #stdin #stdout 0s 3368KB
stdin
Standard input is empty
stdout
gabriel = 1.75,derp = 1.80,