遍历所有匹配
#include <iostream> #include <regex> using namespace std; int main() { wstring wstr = L"我是1994年出生的,我今年25岁了。"; wsmatch wsm; wregex wre(L"[0-9]+"); wsregex_iterator itr1(wstr.begin(), wstr.end(), wre); wsregex_iterator itr2; for (wsregex_iterator itr = itr1; itr != itr2; ++itr) { w