Namespaces
Variants

Standard library header <regex> (C++11)

From cppreference.net
Standard library headers

이 헤더는 텍스트 처리 라이브러리의 일부입니다.

목차

포함 항목

(C++20)
3방향 비교 연산자 지원
std::initializer_list 클래스 템플릿

클래스

정규 표현식 객체
(클래스 템플릿)
std::regex std:: basic_regex < char > (typedef)
std::wregex std:: basic_regex < wchar_t > (typedef)
(C++11)
서브-표현식에 의해 매칭된 문자 시퀀스를 식별합니다
(클래스 템플릿)
std::csub_match std:: sub_match < const char * > (typedef)
std::wcsub_match std:: sub_match < const wchar_t * > (typedef)
std::ssub_match std:: sub_match < std :: string :: const_iterator > (typedef)
std::wssub_match std:: sub_match < std :: wstring :: const_iterator > (typedef)
하나의 정규 표현식 매치와 모든 하위 표현식 매치를 식별함
(클래스 템플릿)
std::cmatch std:: match_results < const char * > (typedef)
std::wcmatch std:: match_results < const wchar_t * > (typedef)
std::smatch std:: match_results < std :: string :: const_iterator > (typedef)
std::wsmatch std:: match_results < std :: wstring :: const_iterator > (typedef)
문자 시퀀스 내의 모든 정규식 일치를 순회합니다
(클래스 템플릿)
std::cregex_iterator std:: regex_iterator < const char * > (typedef)
std::wcregex_iterator std:: regex_iterator < const wchar_t * > (typedef)
std::sregex_iterator std:: regex_iterator < std :: string :: const_iterator > (typedef)
std::wsregex_iterator std:: regex_iterator < std :: wstring :: const_iterator > (typedef)
주어진 문자열 내의 모든 정규식 매치에서 지정된 부분 표현식을 순회하거나 매치되지 않은 부분 문자열을 순회합니다
(클래스 템플릿)
std::cregex_token_iterator std:: regex_token_iterator < const char * > (typedef)
std::wcregex_token_iterator std:: regex_token_iterator < const wchar_t * > (typedef)
std::sregex_token_iterator std:: regex_token_iterator < std :: string :: const_iterator > (typedef)
std::wsregex_token_iterator std:: regex_token_iterator < std :: wstring :: const_iterator > (typedef)
정규 표현식 라이브러리에서 생성된 오류를 보고합니다
(클래스)
문자 타입에 대한 메타정보를 제공하며, regex 라이브러리에서 요구됨
(클래스 템플릿)
regex 상수 타입
네임스페이스 std::regex_constants 에 정의됨
정규식 동작을 제어하는 일반 옵션
(typedef)
매칭에 특화된 옵션들
(typedef)
(C++11)
다양한 유형의 매칭 오류를 설명합니다
(typedef)

함수

알고리즘
정규 표현식을 전체 문자 시퀀스와 매치시키려 시도합니다
(함수 템플릿)
정규 표현식을 문자 시퀀스의 임의의 부분과 일치시키려 시도합니다
(함수 템플릿)
정규 표현식의 매칭 결과를 형식화된 대체 텍스트로 교체합니다
(함수 템플릿)
비멤버 연산
std::swap 알고리즘을 특수화합니다
(함수 템플릿)
(C++20에서 제거됨) (C++20에서 제거됨) (C++20에서 제거됨) (C++20에서 제거됨) (C++20에서 제거됨) (C++20)
sub_match 를 다른 sub_match , 문자열 또는 문자와 비교합니다
(함수 템플릿)
매치된 문자 서브시퀀스를 출력합니다
(함수 템플릿)
(C++20에서 제거됨)
두 매치 결과의 값을 사전식으로 비교합니다
(함수 템플릿)
std::swap 알고리즘을 특수화함
(함수 템플릿)
범위 접근
(C++11) (C++14)
컨테이너나 배열의 시작 부분을 가리키는 반복자를 반환합니다
(함수 템플릿)
(C++11) (C++14)
컨테이너나 배열의 끝을 가리키는 반복자를 반환합니다
(함수 템플릿)
컨테이너나 배열의 시작 부분에 대한 역방향 반복자를 반환합니다
(함수 템플릿)
(C++14)
컨테이너나 배열에 대한 역방향 끝 반복자를 반환합니다
(함수 템플릿)
(C++17) (C++20)
컨테이너나 배열의 크기를 반환합니다
(함수 템플릿)
(C++17)
컨테이너가 비어 있는지 확인합니다
(함수 템플릿)
(C++17)
기본 배열에 대한 포인터를 획득함
(함수 템플릿)

시놉시스

#include <compare>
#include <initializer_list>
namespace std {
  // regex constants
  namespace regex_constants {
    using syntax_option_type = /*T1*/;
    using match_flag_type = /*T2*/;
    using error_type = /*T3*/;
  }
  // class regex_error
  class regex_error;
  // 클래스 템플릿 regex_traits
  template<class CharT> struct regex_traits;
  // class template basic_regex
  template<class CharT, class Traits = regex_traits<CharT>> class basic_regex;
  using regex  = basic_regex<char>;
  using wregex = basic_regex<wchar_t>;
  // basic_regex swap
  template<class CharT, class Traits>
    void swap(basic_regex<CharT, Traits>& e1, basic_regex<CharT, Traits>& e2);
  // 클래스 템플릿 sub_match
  template<class BiIt>
    class sub_match;
  using csub_match  = sub_match<const char*>;
  using wcsub_match = sub_match<const wchar_t*>;
  using ssub_match  = sub_match<string::const_iterator>;
  using wssub_match = sub_match<wstring::const_iterator>;
  // sub_match non-member operators
  template<class BiIt>
    bool operator==(const sub_match<BiIt>& lhs, const sub_match<BiIt>& rhs);
  template<class BiIt>
    auto operator<=>(const sub_match<BiIt>& lhs, const sub_match<BiIt>& rhs);
  template<class BiIt, class ST, class SA>
    bool operator==(
      const sub_match<BiIt>& lhs,
      const basic_string<typename iterator_traits<BiIt>::value_type, ST, SA>& rhs);
  template<class BiIt, class ST, class SA>
    auto operator<=>(
      const sub_match<BiIt>& lhs,
      const basic_string<typename iterator_traits<BiIt>::value_type, ST, SA>& rhs);
  template<class BiIt>
    bool operator==(const sub_match<BiIt>& lhs,
                    const typename iterator_traits<BiIt>::value_type* rhs);
  template<class BiIt>
    auto operator<=>(const sub_match<BiIt>& lhs,
                     const typename iterator_traits<BiIt>::value_type* rhs);
  template<class BiIt>
    bool operator==(const sub_match<BiIt>& lhs,
                    const typename iterator_traits<BiIt>::value_type& rhs);
  template<class BiIt>
    auto operator<=>(const sub_match<BiIt>& lhs,
                     const typename iterator_traits<BiIt>::value_type& rhs);
  template<class CharT, class ST, class BiIt>
    basic_ostream<CharT, ST>&
      operator<<(basic_ostream<CharT, ST>& os, const sub_match<BiIt>& m);
  // 클래스 템플릿 match_results
  template<class BiIt,
           class Allocator = allocator<sub_match<BiIt>>>
    class match_results;
  using cmatch  = match_results<const char*>;
  using wcmatch = match_results<const wchar_t*>;
  using smatch  = match_results<string::const_iterator>;
  using wsmatch = match_results<wstring::const_iterator>;
  // match_results 비교 연산
  template<class BiIt, class Allocator>
    bool operator==(const match_results<BiIt, Allocator>& m1,
                    const match_results<BiIt, Allocator>& m2);
  // match_results swap
  template<class BiIt, class Allocator>
    void swap(match_results<BiIt, Allocator>& m1, match_results<BiIt, Allocator>& m2);
  // function template regex_match
  template<class BiIt, class Allocator, class CharT, class Traits>
    bool regex_match(BiIt first, BiIt last,
                     match_results<BiIt, Allocator>& m,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  template<class BiIt, class CharT, class Traits>
    bool regex_match(BiIt first, BiIt last,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  template<class CharT, class Allocator, class Traits>
    bool regex_match(const CharT* str, match_results<const CharT*, Allocator>& m,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  template<class ST, class SA, class Allocator, class CharT, class Traits>
    bool regex_match(const basic_string<CharT, ST, SA>& s,
                     match_results<typename basic_string<CharT, ST, SA>::const_iterator,
                                   Allocator>& m,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  template<class ST, class SA, class Allocator, class CharT, class Traits>
    bool regex_match(const basic_string<CharT, ST, SA>&&,
                     match_results<typename basic_string<CharT, ST, SA>::const_iterator,
                                   Allocator>&,
                     const basic_regex<CharT, Traits>&,
                     regex_constants::match_flag_type =
                       regex_constants::match_default) = delete;
  template<class CharT, class Traits>
    bool regex_match(const CharT* str,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  template<class ST, class SA, class CharT, class Traits>
    bool regex_match(const basic_string<CharT, ST, SA>& s,
                     const basic_regex<CharT, Traits>& e,
                     regex_constants::match_flag_type flags =
                       regex_constants::match_default);
  // 함수 템플릿 regex_search
  template<class BiIt, class Allocator, class CharT, class Traits>
    bool regex_search(BiIt first, BiIt last,
                      match_results<BiIt, Allocator>& m,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class BiIt, class CharT, class Traits>
    bool regex_search(BiItfirst, BiIt last,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class CharT, class Allocator, class Traits>
    bool regex_search(const CharT* str,
                      match_results<const CharT*, Allocator>& m,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class CharT, class Traits>
    bool regex_search(const CharT* str,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class ST, class SA, class CharT, class Traits>
    bool regex_search(const basic_string<CharT, ST, SA>& s,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class ST, class SA, class Allocator, class CharT, class Traits>
    bool regex_search(const basic_string<CharT, ST, SA>& s,
                      match_results<typename basic_string<CharT, ST, SA>::const_iterator,
                                    Allocator>& m,
                      const basic_regex<CharT, Traits>& e,
                      regex_constants::match_flag_type flags =
                        regex_constants::match_default);
  template<class ST, class SA, class Allocator, class CharT, class Traits>
    bool regex_search(const basic_string<CharT, ST, SA>&&,
                      match_results<typename basic_string<CharT, ST, SA>::const_iterator,
                                    Allocator>&,
                      const basic_regex<CharT, Traits>&,
                      regex_constants::match_flag_type
                        = regex_constants::match_default) = delete;
  // function template regex_replace
  template<class OutputIt, class BiIt,
            class Traits, class CharT, class ST, class SA>
    OutputIt
      regex_replace(OutputIt out,
                    BiIt first, BiIt last,
                    const basic_regex<CharT, Traits>& e,
                    const basic_string<CharT, ST, SA>& fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  template<class OutputIt, class BiIt, class Traits, class CharT>
    OutputIt
      regex_replace(OutputIt out,
                    BiIt first, BiIt last,
                    const basic_regex<CharT, Traits>& e,
                    const CharT* fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  template<class Traits, class CharT, class ST, class SA, class FST, class FSA>
    basic_string<CharT, ST, SA>
      regex_replace(const basic_string<CharT, ST, SA>& s,
                    const basic_regex<CharT, Traits>& e,
                    const basic_string<CharT, FST, FSA>& fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  template<class Traits, class CharT, class ST, class SA>
    basic_string<CharT, ST, SA>
      regex_replace(const basic_string<CharT, ST, SA>& s,
                    const basic_regex<CharT, Traits>& e,
                    const CharT* fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  template<class Traits, class CharT, class ST, class SA>
    basic_string<CharT>
      regex_replace(const CharT* s,
                    const basic_regex<CharT, Traits>& e,
                    const basic_string<CharT, ST, SA>& fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  template<class Traits, class CharT>
    basic_string<CharT>
      regex_replace(const CharT* s,
                    const basic_regex<CharT, Traits>& e,
                    const CharT* fmt,
                    regex_constants::match_flag_type flags =
                      regex_constants::match_default);
  // 클래스 템플릿 regex_iterator
  template<class BiIt,
            class CharT = typename iterator_traits<BiIt>::value_type,
            class Traits = regex_traits<CharT>>
    class regex_iterator;
  using cregex_iterator  = regex_iterator<const char*>;
  using wcregex_iterator = regex_iterator<const wchar_t*>;
  using sregex_iterator  = regex_iterator<string::const_iterator>;
  using wsregex_iterator = regex_iterator<wstring::const_iterator>;
  // class template regex_token_iterator
  template<class BiIt,
            class CharT = typename iterator_traits<BiIt>::value_type,
            class Traits = regex_traits<CharT>>
    class regex_token_iterator;
  using cregex_token_iterator  = regex_token_iterator<const char*>;
  using wcregex_token_iterator = regex_token_iterator<const wchar_t*>;
  using sregex_token_iterator  = regex_token_iterator<string::const_iterator>;
  using wsregex_token_iterator = regex_token_iterator<wstring::const_iterator>;
  namespace pmr {
    template<class BiIt>
      using match_results =
        std::match_results<BiIt, polymorphic_allocator<sub_match<BiIt>>>;
    using cmatch  = match_results<const char*>;
    using wcmatch = match_results<const wchar_t*>;
    using smatch  = match_results<string::const_iterator>;
    using wsmatch = match_results<wstring::const_iterator>;
  }
}

비트마스크 타입 std::regex_constants::syntax_option_type

namespace std::regex_constants {
  using syntax_option_type = /*T1*/;
  inline constexpr syntax_option_type icase = /* unspecified */;
  inline constexpr syntax_option_type nosubs = /* unspecified */;
  inline constexpr syntax_option_type optimize = /* unspecified */;
  inline constexpr syntax_option_type collate = /* unspecified */;
  inline constexpr syntax_option_type ECMAScript = /* unspecified */;
  inline constexpr syntax_option_type basic = /* unspecified */;
  inline constexpr syntax_option_type extended = /* unspecified */;
  inline constexpr syntax_option_type awk = /* unspecified */;
  inline constexpr syntax_option_type grep = /* unspecified */;
  inline constexpr syntax_option_type egrep = /* unspecified */;
  inline constexpr syntax_option_type multiline = /* unspecified */;
}

비트마스크 타입 std::regex_constants::match_flag_type

namespace std::regex_constants {
  using match_flag_type = /*T2*/;
  inline constexpr match_flag_type match_default = {};
  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 = {};
  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 */;
}

열거형 std::regex_constants::error_type

namespace std::regex_constants {
  using error_type = /*T3*/;
  inline constexpr error_type error_collate = /* 지정되지 않음 */;
  inline constexpr error_type error_ctype = /* 지정되지 않음 */;
  inline constexpr error_type error_escape = /* 지정되지 않음 */;
  inline constexpr error_type error_backref = /* 지정되지 않음 */;
  inline constexpr error_type error_brack = /* 지정되지 않음 */;
  inline constexpr error_type error_paren = /* 지정되지 않음 */;
  inline constexpr error_type error_brace = /* 지정되지 않음 */;
  inline constexpr error_type error_badbrace = /* 지정되지 않음 */;
  inline constexpr error_type error_range = /* 지정되지 않음 */;
  inline constexpr error_type error_space = /* 지정되지 않음 */;
  inline constexpr error_type error_badrepeat = /* 지정되지 않음 */;
  inline constexpr error_type error_complexity = /* 지정되지 않음 */;
  inline constexpr error_type error_stack = /* 지정되지 않음 */;
}

클래스 std::regex_error

namespace std {
  class regex_error : public runtime_error {
  public:
    explicit regex_error(regex_constants::error_type ecode);
    regex_constants::error_type code() const;
  };
}

클래스 템플릿 std::regex_traits

namespace std {
  template<class CharT>
    struct regex_traits {
      using char_type       = CharT;
      using string_type     = basic_string<char_type>;
      using locale_type     = locale;
      using char_class_type = /* 비트마스크 타입 */;
      regex_traits();
      static size_t length(const char_type* p);
      CharT translate(CharT c) const;
      CharT translate_nocase(CharT c) const;
      template<class ForwardIt>
        string_type transform(ForwardIt first, ForwardIt last) const;
      template<class ForwardIt>
        string_type transform_primary(ForwardIt first, ForwardIt last) const;
      template<class ForwardIt>
        string_type lookup_collatename(ForwardIt first, ForwardIt last) const;
      template<class ForwardIt>
        char_class_type lookup_classname(ForwardIt first, ForwardIt last,
                                         bool icase = false) const;
      bool isctype(CharT c, char_class_type f) const;
      int value(CharT ch, int radix) const;
      locale_type imbue(locale_type l);
      locale_type getloc() const;
    };
}

클래스 템플릿 std::basic_regex

namespace std {
  template<class CharT, class Traits = regex_traits<CharT>>
    class basic_regex {
    public:
      // types
      using value_type  =          CharT;
      using Traits_type =          Traits;
      using string_type = typename Traits::string_type;
      using flag_type   =          regex_constants::syntax_option_type;
      using locale_type = typename Traits::locale_type;
      // 상수
      static constexpr flag_type icase = regex_constants::icase;
      static constexpr flag_type nosubs = regex_constants::nosubs;
      static constexpr flag_type optimize = regex_constants::최적화;
      static constexpr flag_type collate = regex_constants::collate;
      static constexpr flag_type ECMAScript = regex_constants::ECMAScript;
      static constexpr flag_type basic = regex_constants::basic;
      static constexpr flag_type extended = regex_constants::확장된;
      static constexpr flag_type awk = regex_constants::awk;
      static constexpr flag_type grep = regex_constants::grep;
      static constexpr flag_type egrep = regex_constants::egrep;
      static constexpr flag_type multiline = regex_constants::다중 행;
      // construct/copy/destroy
      basic_regex();
      explicit basic_regex(const CharT* p, flag_type f = regex_constants::ECMAScript);
      basic_regex(const CharT* p, size_t len, flag_type f = regex_constants::ECMAScript);
      basic_regex(const basic_regex&);
      basic_regex(basic_regex&&) noexcept;
      template<class ST, class SA>
        explicit basic_regex(const basic_string<CharT, ST, SA>& s,
                             flag_type f = regex_constants::ECMAScript);
      template<class ForwardIt>
        basic_regex(ForwardIt first, ForwardIt last,
                    flag_type f = regex_constants::ECMAScript);
      basic_regex(initializer_list<CharT> il, flag_type f = regex_constants::ECMAScript);
      ~basic_regex();
      // assign
      basic_regex& operator=(const basic_regex& e);
      basic_regex& operator=(basic_regex&& e) noexcept;
      basic_regex& operator=(const CharT* p);
      basic_regex& operator=(initializer_list<CharT> il);
      template<class ST, class SA>
        basic_regex& operator=(const basic_string<CharT, ST, SA>& s);
      basic_regex& assign(const basic_regex& e);
      basic_regex& assign(basic_regex&& e) noexcept;
      basic_regex& assign(const CharT* p, flag_type f = regex_constants::ECMAScript);
      basic_regex& assign(const CharT* p, size_t len,
                          flag_type f = regex_constants::ECMAScript);
      template<class ST, class SA>
        basic_regex& assign(const basic_string<CharT, ST, SA>& s,
                            flag_type f = regex_constants::ECMAScript);
      template<class InputIt>
        basic_regex& assign(InputIt first, InputIt last,
                            flag_type f = regex_constants::ECMAScript);
      basic_regex& assign(initializer_list<CharT>,
                          flag_type f = regex_constants::ECMAScript);
      // const 연산
      unsigned mark_count() const;
      flag_type flags() const;
      // locale
      locale_type imbue(locale_type loc);
      locale_type getloc() const;
      // swap
      void swap(basic_regex&);
    };
  template<class ForwardIt>
    basic_regex(ForwardIt, ForwardIt,
                regex_constants::syntax_option_type = regex_constants::ECMAScript)
      -> basic_regex<typename iterator_traits<ForwardIt>::value_type>;
}

클래스 템플릿 std::sub_match

namespace std {
  template<class BiIt>
    class sub_match : public pair<BiIt, BiIt> {
    public:
      using value_type      = typename iterator_traits<BiIt>::value_type;
      using difference_type = typename iterator_traits<BiIt>::difference_type;
      using iterator        = BiIt;
      using string_type     = basic_string<value_type>;
      bool matched;
      constexpr sub_match();
      difference_type length() const;
      operator string_type() const;
      string_type str() const;
      int compare(const sub_match& s) const;
      int compare(const string_type& s) const;
      int compare(const value_type* s) const;
      void swap(sub_match& s) noexcept(/* 설명 참조 */);
    };
}

클래스 템플릿 std::match_results

namespace std {
  template<class BiIt,
           class Allocator = allocator<sub_match<BiIt>>>
    class match_results {
    public:
      using value_type      = sub_match<BiIt>;
      using const_reference = const value_type&;
      using reference       = value_type&;
      using const_iterator  = /* 구현 정의 */;
      using iterator        = const_iterator;
      using difference_type = typename iterator_traits<BiIt>::difference_type;
      using size_type       = typename allocator_traits<Allocator>::size_type;
      using allocator_type  = Allocator;
      using char_type       = typename iterator_traits<BiIt>::value_type;
      using string_type     = basic_string<char_type>;
      // 생성/복사/소멸
      match_results() : match_results(Allocator()) {}
      explicit match_results(const Allocator& a);
      match_results(const match_results& m);
      match_results(const match_results& m, const Allocator& a);
      match_results(match_results&& m) noexcept;
      match_results(match_results&& m, const Allocator& a);
      match_results& operator=(const match_results& m);
      match_results& operator=(match_results&& m);
      ~match_results();
      // 상태
      bool ready() const;
      // 크기
      size_type size() const;
      size_type max_size() const;
      bool empty() const;
      // 요소 접근
      difference_type length(size_type sub = 0) const;
      difference_type position(size_type sub = 0) const;
      string_type str(size_type sub = 0) const;
      const_reference operator[](size_type n) const;
      const_reference prefix() const;
      const_reference suffix() const;
      const_iterator begin() const;
      const_iterator end() const;
      const_iterator cbegin() const;
      const_iterator cend() const;
      // 형식화
      template<class OutputIt>
        OutputIt
          format(OutputIt out,
                 const char_type* fmt_first, const char_type* fmt_last,
                 regex_constants::match_flag_type flags =
                   regex_constants::format_default) const;
      template<class OutputIt, class ST, class SA>
        OutputIt
          format(OutputIt out,
                 const basic_string<char_type, ST, SA>& fmt,
                 regex_constants::match_flag_type flags =
                   regex_constants::format_default) const;
      template<class ST, class SA>
        basic_string<char_type, ST, SA>
          format(const basic_string<char_type, ST, SA>& fmt,
                 regex_constants::match_flag_type flags =
                   regex_constants::format_default) const;
      string_type
        format(const char_type* fmt,
               regex_constants::match_flag_type flags =
                 regex_constants::format_default) const;
      // 할당자
      allocator_type get_allocator() const;
      // 교환
      void swap(match_results& that);
    };
}