• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    <regex>

    regex

    <regex>ヘッダは、正規表現に関するクラス・関数を定義する。

    このヘッダでは、以下の標準ヘッダをインクルードする:

    正規表現クラス

    名前 説明 対応バージョン
    basic_regex 正規表現クラス (class template) C++11
    regex char版の正規表現クラス (type-alias) C++11
    wregex wchar_t版の正規表現クラス (type-alias) C++11

    オプション・定数

    名前 説明 対応バージョン
    regex_constants 正規表現の構文オプション、マッチフラグ、エラー値などの定数 (namespace) C++11
    regex_traits 正規表現の文字・変換に関する特性 (class template) C++11

    エラー

    名前 説明 対応バージョン
    regex_error このライブラリから送出される正規表現の例外 (class) C++11

    マッチ結果

    名前 説明 対応バージョン
    sub_match 各サブマッチ結果が格納されるクラス (class template) C++11
    csub_match sub_match クラスの const char* 型バージョン (type-alias) C++11
    wcsub_match sub_match クラスの const wchar_t* 型バージョン (type-alias) C++11
    ssub_match sub_match クラスの string::const_iterator バージョン (type-alias) C++11
    wssub_match sub_match クラスの wstring::const_iterator バージョン (type-alias) C++11
    match_results 全マッチ結果が格納されるクラス (class template) C++11
    cmatch match_results クラスの const char* 型バージョン (type-alias) C++11
    wcmatch match_results クラスの const wchar_t* 型バージョン (type-alias) C++11
    smatch match_results クラスの string::const_iterator バージョン (type-alias) C++11
    wsmatch match_results クラスの wstring::const_iterator バージョン (type-alias) C++11
    pmr::cmatch 多相アロケータを用いるmatch_results クラスの const char* 型バージョン (type-alias) C++17
    pmr::wcmatch 多相アロケータを用いるmatch_results クラスの const wchar_t* 型バージョン (type-alias) C++17
    pmr::smatch 多相アロケータを用いるmatch_results クラスの string::const_iterator バージョン (type-alias) C++17
    pmr::wsmatch 多相アロケータを用いるmatch_results クラスの wstring::const_iterator バージョン (type-alias) C++17

    アルゴリズム

    名前 説明 対応バージョン
    regex_match 文字列全体が正規表現にマッチするか否かの判定を行う (function template) C++11
    regex_search 文字列内に正規表現にマッチする部分が存在するか否かの判定を行う (function template) C++11
    regex_replace 文字列内の正規表現にマッチする部分を置換する (function template) C++11

    イテレータアダプタ

    名前 説明 対応バージョン
    regex_iterator 正規表現のマッチ結果を走査するためのイテレータ (class template) C++11
    cregex_iterator regex_iterator<const char*> の別名 C++11
    wcregex_iterator regex_iterator<const wchar_t*> の別名 C++11
    sregex_iterator regex_iterator<string::const_iterator> の別名 C++11
    wsregex_iterator regex_iterator<wstring::const_iterator> の別名 C++11
    regex_token_iterator 正規表現のサブマッチを走査するためのイテレータ (class template) C++11
    cregex_token_iterator regex_token_iterator<const char*> の別名 C++11
    wcregex_token_iterator regex_token_iterator<const wchar_t*> の別名 C++11
    scregex_token_iterator regex_token_iterator<string::const_iterator> の別名 C++11
    wscregex_token_iterator regex_token_iterator<wstring::const_iterator> の別名 C++11

    バージョン

    言語

    • C++11

    参照