64,648
社区成员
发帖
与我相关
我的任务
分享
boost::regex pat("(?<=line1=).*(?=line2)");
string card_str("line1=aaa,line2=bbb,line3=ccc");
boost::smatch mat;
cout << boost::regex_match(card_str, mat, pat) << endl;
cout << mat.size() << endl;
for (size_t i = 0; i<mat.size(); i++)
{
cout << "Match " << i << ":" << mat[i] << endl;
}
cout << "----" << endl;