16,472
社区成员
发帖
与我相关
我的任务
分享
int main()
{
boost::regex expression("str(.)ng");
string in = "Here is a string to match.";
string sRet;
boost::smatch what;
bool blRet = boost::regex_search( in , what, expression);
if(blRet) //CString转string
for(size_t i=0;i <what.size();i++)
{
sRet = (what.str()).c_str();
MessageBox( 0 , sRet.c_str() ,0,0 );
}
else
MessageBox( 0 ,"Error Input",0,0 );
return 0;
}