#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;
}

相关文章:

  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-04-28
  • 2021-09-09
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案