Namespaces
Variants

std::match_results<BidirIt,Alloc>:: suffix

From cppreference.net
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
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)