Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
C++ Standard Template Library
std::reference_wrapper
EBO
problem_name_2
List comprehension in C++ using functional patterns
Fun with Pointers #2
hello,world !ssn2019
Variadic Template: Make Index Sequence
Arduino Bluetooth Periodiek Systeem
1337
Please log in to post a comment.