Getting sub-match_results with boost::regex
问题 Hey, let's say I have this regex: (test[0-9])+ And that I match it against: test1test2test3test0 const bool ret = boost::regex_search(input, what, r); for (size_t i = 0; i < what.size(); ++i) cout << i << ':' << string(what[i]) << "\n"; Now, what[1] will be test0 (the last occurrence). Let's say that I need to get test1 , 2 and 3 as well: what should I do? Note: the real regex is extremely more complex and has to remain one overall match, so changing the example regex to (test[0-9]) won't