タグ

2014年5月20日のブックマーク (1件)

  • STLで正規表現 - shikaku's blog

    ※OLE2T が実行されるたびに、スタック領域が消費されるのでループ内での使用や、非常に大きな文字列の使用は避けてね! #include <regex> #include <string> #include <iostream> ..... // パーサー LPTSTR p_json = OLE2T(json); // strtok "}"で区切り LPTSTR p_tp; LPTSTR p_next; p_tp = _tcstok_s(p_json,_T("}"),&p_next); // 最初の1回 while( p_tp != NULL ){ std::wcmatch match; std::wregex regex(_T("\"ABC\":[0123456789]*")); if (std::regex_search(p_tp, match, regex)) { const wch

    STLで正規表現 - shikaku's blog
    xxxxxeeeee
    xxxxxeeeee 2014/05/20
    regexオブジェクト自体は作りなおす必要ないんじゃないかな