std::match_results<BidirIt,Alloc>:: suffix
From ja.cppreference.net
<
cpp
|
regex
|
match results
|
const_reference suffix
(
)
const
;
|
(C++11以降) | |
正規表現の全体一致の終端と対象シーケンスの終端との間の対象シーケンスを表す std::sub_match オブジェクトへの参照を取得します。
ready()
は
true
でなければなりません。そうでない場合、動作は未定義です。
目次 |
パラメータ
(なし)
戻り値
一致しない接尾辞への参照。
例
このコードを実行
#include <iostream> #include <regex> #include <string> int main() { std::regex re("a(a)*by"); std::string target("baaaby123"); std::smatch sm; std::regex_search(target, sm, re); std::cout << sm.suffix() << '\n'; }
出力:
123
関連項目
|
ターゲットシーケンスの先頭と完全一致の先頭の間の部分シーケンスを返す
(公開メンバ関数) |