May 2017
Intermediate to advanced
590 pages
17h 18m
English
In order to perform text transformations using regular expressions, you should perform the following:
#include <regex> #include <string> using namespace std::string_literals;
auto text{"abc aa bca ca bbbb"s}; auto rx = std::regex{ R"(\b[a|b|c]{3}\b)"s }; auto newtext = std::regex_replace(text, rx, "---"s);
Read now
Unlock full access