c++正则查找
#include <iostream>
#include <boost/regex.hpp>
using namespace std;
int main()
{
boost::regex reg("\\{([\\w]+)\\}");
std::string s="{afd}lookki{vvvv}kjkj{ddd}{ssss}{fddda}";
boost::sregex_iterator end;
for (boost::sregex_iterator it(s.begin(),s.end(),reg); it != end; it++)
{
cout << (*it)[0].str() << endl;
cout << (*it)[1].str() << endl;}
return 0;
}