Skip to content

Instantly share code, notes, and snippets.

@NeilHanlon
Created February 18, 2014 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeilHanlon/9073684 to your computer and use it in GitHub Desktop.
Save NeilHanlon/9073684 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <regex>
#include <string>
int main(){
string s1 = "Gcc aasdlkf blah Gcc",
s2 = "Gcc asldkfjae adf Gcc";
regex rx ("Gcc");
string replace = "gcc";
regex_replace(s1,rx,replace);
regex_replace(s2,rx,replace);
cout << s1 << "\n";
cout << s2;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment