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
BucketSort
Throttle Example in C++
12/2
for_each_argument
C++ Register
11/18
non-template template parameters for container stream insertion: SFINAE
specialized template
Balanced Insert Heap Example
Union-Struct-uint32_t byte order