I'm trying to learn using regex in C++ and I got this code:
std::string s("21\n");
std::regex e("\\b(2)1");
std::cout << std::regex_replace(s, e, "${1}0 first");
I wanna turn
21
into
20 first
but {} seem not to separate capture '$1' like in C#. What should I use then?
And overall can someone point me to C++ regex library documentation? It seems I can't find one. Or maybe somebody can point me to a better library with full documentation?