Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iterator>
- #include <string>
- #include <regex>
- int main()
- {
- std::string s = "A%sBC%sD";
- std::regex regexp("%s");
- std::string new_s = std::regex_replace(s, regexp, "%|s");
- std::cout << s << '\n';
- std::cout << new_s << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement