我试图找出一个字符串中有多少个正则表达式匹配项。我正在使用迭代器来迭代匹配项,并使用整数来记录有多少匹配项。longintbefore=GetTickCount();stringtext;boost::regexre("^(\\d{5})\\s(\\d{8})\\s(.*)\\s(.*)\\s(.*)\\s(\\d{8})\\s(.{1})$");char*buffer;longlength;longcount;ifstreamf;f.open("c:\\temp\\test.txt",ios::in|ios::ate);length=f.tellg();f.seekg(0,ios::