◐ Shell
clean mode source ↗

std::regex_constants::match_flag_type - cppreference.com

提供: cppreference.com

<tbody> </tbody> <tbody class="t-dcl-rev "> </tbody><tbody> </tbody>

ヘッダ <regex> で定義

typedef /*unspecified*/ match_flag_type;

(C++11以上)

constexpr match_flag_type match_default = 0; constexpr match_flag_type match_not_bol = /*unspecified*/; constexpr match_flag_type match_not_eol = /*unspecified*/; constexpr match_flag_type match_not_bow = /*unspecified*/; constexpr match_flag_type match_not_eow = /*unspecified*/; constexpr match_flag_type match_any = /*unspecified*/; constexpr match_flag_type match_not_null = /*unspecified*/; constexpr match_flag_type match_continuous = /*unspecified*/; constexpr match_flag_type match_prev_avail = /*unspecified*/; constexpr match_flag_type format_default = 0; constexpr match_flag_type format_sed = /*unspecified*/; constexpr match_flag_type format_no_copy = /*unspecified*/; constexpr match_flag_type format_first_only = /*unspecified*/;

(C++11以上)
(C++17未満)

inline constexpr match_flag_type match_default = 0; inline constexpr match_flag_type match_not_bol = /*unspecified*/; inline constexpr match_flag_type match_not_eol = /*unspecified*/; inline constexpr match_flag_type match_not_bow = /*unspecified*/; inline constexpr match_flag_type match_not_eow = /*unspecified*/; inline constexpr match_flag_type match_any = /*unspecified*/; inline constexpr match_flag_type match_not_null = /*unspecified*/; inline constexpr match_flag_type match_continuous = /*unspecified*/; inline constexpr match_flag_type match_prev_avail = /*unspecified*/; inline constexpr match_flag_type format_default = 0; inline constexpr match_flag_type format_sed = /*unspecified*/; inline constexpr match_flag_type format_no_copy = /*unspecified*/; inline constexpr match_flag_type format_first_only = /*unspecified*/;

(C++17以上)

match_flag_type は追加の正規表現マッチングオプションを指定する BitmaskType です。

定数

ノート: [first, last) はマッチングの処理対象の文字シーケンスを参照します。

定数 説明
match_not_bol [first,last) の最初の文字を行頭でないかのように扱います (つまり ^[first,first) にマッチしません)。
match_not_eol [first,last) の最後の文字を行末でないかのように扱います (つまり $[last,last) にマッチしません)。
match_not_bow "\b"[first,first) にマッチしません。
match_not_eow "\b"[last,last) にマッチしません。
match_any 2通り以上のマッチが可能な場合、いずれのマッチも受理可能な結果になります。
match_not_null 空のシーケンスにマッチしません。
match_continuous first で始まる部分シーケンスにのみマッチします。
match_prev_avail --first は有効なイテレータ位置です。 セットされた場合、 match_not_bol および match_not_bow は無視されます。
format_default std::regex_replace で文字列を構築するために ECMAScript の規則を使用します (構文のドキュメント)。
format_sed std::regex_replace で POSIX の sed ユーティリティの規則を使用します (構文のドキュメント)。
format_no_copy std::regex_replace でマッチしなかった文字列を出力にコピーしません。
format_first_only std::regex_replace で最初のマッチだけを置換します。

match_default および format_default を除くすべての定数はビットマスクの要素です。 定数 match_default および format_default は空のビットマスクです。

ノート

C++11 では、これらの定数は冗長なキーワード static を使用して規定されていました。 これは C++14 で LWG issue 2053 によって削除されました。

関連項目