boostorg / boostorg/algorithm

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

オープン
#79 コメント 0 件 リアクション 0 件 担当者 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<

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

CMakeLists.txt の設定を使用して src.cpp の動作を再現し、UTF-8 のサンプルで split_regex と u32regex_replace を比較します。boost::algorithm split_regex のエントリポイントとその正規表現処理から始めます。サンプルが期待されるトークンに分割され、この動作をカバーする回帰テストがあれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。