vector<CString>::iterator it;
for(it = vtNoAlignCH.begin(); it != vtNoAlignCH.end(); it++)
{
//宽字节正则
wstring line = *it;
wregex rgx(L"[\\u4e00-\\u9fa5]+");
std::wsmatch ms;
bool ret = regex_search(line, ms, rgx);
std::wstring::const_iterator start = line.begin();
std::wstring::const_iterator end = line.end();
while (regex_search(start, end, ms, rgx) )
{
start = ms[0].second;
TRACE("start:%d length:%d \n",ms.position(0),ms.length(0));
}
}
时间: 2024-10-11 06:08:23