Numbered back reference followed by literal number
问题 I'm trying to perform a regular expression substitution. The specific issue I can't seem to figure out is that following my 2nd backreference, I have a string literal number (the numeral one). Using MS Visual Studio 2012 (C++ console project...not .NET), it doesn't work. I assume because it takes my backreference as $21, instead of $2. I've tried various syntax but can't come up with something that works! std::string input = "my_variable_name_iei_lo1"; std::string regx = "(\\w+)iei_(lo_hi)1";