#include "stdafx.h"
#include <cstdlib>
#include <stdlib.h>
#include <boost/regex.hpp>
#include <string>
#include <iostream>
using namespace std;
using namespace boost;
regex reg("a(//d*)b");
int main(int argc, char* argv[])
{
string in;
cmatch what;
cout << "enter test string" << endl;
getline(cin,in);
sregex_token_iterator it( in.begin(), in.end(), reg, 1 );
sregex_token_iterator end;
while ( it != end )
{
cout << ( *it++ ) << endl;
}
system( "pause" );
return 0;
}
boost正则表达式多次匹配
最新推荐文章于 2022-09-24 15:35:17 发布