Created
February 12, 2016 16:51
-
-
Save sh0seo/0b0f043622e198bf62a3 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 <boost/regex.hpp> | |
#include <string> | |
#include <iostream> | |
int main() | |
{ | |
std::string s = " Boost Libraries "; | |
boost::regex expr{"\\s"}; | |
std::string fmt{"_"}; | |
std::cout << boost::regex_replace(s, expr, fmt) << '\n'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment