std::match_results<BidirIt,Alloc>::suffix
From cppreference.com
< 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
[編集] 関連項目
| ターゲットシーケンスの開始と全体のマッチの開始の間のサブシーケンスを返します。 (public member function) |