string str; string buffer="какойто список"; cin > > str; boost::regex::smath smatch; boost::regex rg(str); boost::regex::regex_search(buffer,smath,rg,boost::match_extra); for(int i=0; i < smatch.captures(1).size(); ++i) cout<<smatch.captures(1)[j]<<endl;