Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
regex
#include <iostream> #include <iterator> #include <regex> #include <string> int main() { std::string text = "Quick brown fox\\351"; std::regex vowel_re(R"(\\\d{3})"); // write the results to an output iterator std::regex_replace(std::ostreambuf_iterator<char>(std::cout), text.begin(), text.end(), vowel_re, "*"); // construct a string holding the results std::cout << '\n' << std::regex_replace(text, vowel_re, "[$&]") << '\n'; }
run
|
edit
|
history
|
help
0
Forgetting to check end
marquee text in C++
Assertion Divide by Zero Example
Array-Based Heap Example Starter Code
vf
ternary test
Unpacking tuple
lref assignment
MPL 2-1
using directives: qualified lookup rules are different from unqualified lookup rules