c++ boost判断一个字符串中是否含有汉字的代码

for (set<string>::iterator it=institutionnames.begin();it!=institutionnames.end();it++)
 {
  wstring wtemp
=strp.String2Wstring(*it);
  boost::wregex wreg(L
"[\u4e00-\u9fa5]");
  boost::wsmatch m;
  wstring::const_iterator mybegin
=wtemp.begin();
  wstring::const_iterator myend
=wtemp.end();
  
  
if (wtemp.size()>3)
  {
   
if (boost::regex_search(mybegin,myend,m,wreg))
           {
      standardwps.push_back(
*it);

           }
   
  }

 }
原文地址:https://www.cnblogs.com/finallyliuyu/p/2115916.html