Created
February 18, 2014 15:56
-
-
Save NeilHanlon/9073684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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