boostorg / boostorg/algorithm

boost::algorithm::split_regex doesn't work with boost::u32regex.

未关闭
#79 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
131
派生
117
PR 合并指标
30 天内没有已合并 PR

描述

I want to split a UTF-8 string into tokens. However it looks like that **split_regex()** failed and just return original string. I also tried `u32regex_replace()` and it indeed replaced successfully.

src.cpp:
```
// CutWord.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include
#include
#include

#include
#include
#include
#include

using namespace std;

int main()
{
string str="数学。数学。数学。";

//Split
vector vs;
//regexU3 stores expression.
boost::u32regex regexU32= boost::make_u32regex("。");
boost::split_regex(vs, str,regexU32);
cout<

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。