|
bool | ready () const noexcept |
|
|
| match_results () |
|
| match_results (const _Alloc &__a) noexcept |
|
| match_results (const match_results &)=default |
|
| match_results (match_results &&) noexcept=default |
|
match_results & | operator= (const match_results &)=default |
|
match_results & | operator= (match_results &&)=default |
|
| ~match_results ()=default |
|
|
size_type | size () const noexcept |
|
size_type | max_size () const noexcept |
|
bool | empty () const noexcept |
|
|
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 __sub) const |
|
const_reference | prefix () const |
|
const_reference | suffix () const |
|
const_iterator | begin () const noexcept |
|
const_iterator | cbegin () const noexcept |
|
const_iterator | end () const noexcept |
|
const_iterator | cend () const noexcept |
|
|
These functions perform formatted substitution of the matched character sequences into their target. The format specifiers and escape sequences accepted by these functions are determined by their flags parameter as documented above.
|
template<typename _Out_iter > |
_Out_iter | format (_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, match_flag_type __flags=regex_constants::format_default) const |
|
template<typename _Out_iter , typename _St , typename _Sa > |
_Out_iter | format (_Out_iter __out, const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const |
|
template<typename _St , typename _Sa > |
basic_string< char_type, _St, _Sa > | format (const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const |
|
string_type | format (const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const |
|
|
allocator_type | get_allocator () const noexcept |
|
|
void | swap (match_results &__that) noexcept |
|
template<typename _Bi_iter, typename _Alloc = allocator<sub_match<_Bi_iter> >>
class std::match_results< _Bi_iter, _Alloc >
The results of a match or search operation.
A collection of character sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class template match_results.
This class satisfies the Sequence requirements, with the exception that only the operations defined for a const-qualified Sequence are supported.
The sub_match object stored at index 0 represents sub-expression 0, i.e. the whole match. In this case the sub_match member matched is always true. The sub_match object stored at index n denotes what matched the marked sub-expression n within the matched expression. If the sub-expression n participated in a regular expression match then the sub_match member matched evaluates to true, and members first and second denote the range of characters [first, second) which formed that match. Otherwise matched is false, and members first and second point to the end of the sequence that was searched.
Definition at line 39 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
difference_type std::match_results< _Bi_iter, _Alloc >::length |
( |
size_type |
__sub = 0 | ) |
const |
|
inline |
Gets the length of the indicated submatch.
- Parameters
-
__sub | indicates the submatch. |
- Precondition
- ready() == true
This function returns the length of the indicated submatch, or the length of the entire match if __sub
is zero (the default).
Definition at line 1823 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
- Returns
- the number of matches found.
Definition at line 1795 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_reference std::match_results< _Bi_iter, _Alloc >::operator[] |
( |
size_type |
__sub | ) |
const |
|
inline |
Gets a sub_match reference for the match or submatch.
- Parameters
-
__sub | indicates the submatch. |
- Precondition
- ready() == true
This function gets a reference to the indicated submatch, or the entire match if __sub
is zero.
If __sub
>= size() then this function returns a sub_match with a special value indicating no submatch.
Definition at line 1866 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
difference_type std::match_results< _Bi_iter, _Alloc >::position |
( |
size_type |
__sub = 0 | ) |
const |
|
inline |
Gets the offset of the beginning of the indicated submatch.
- Parameters
-
__sub | indicates the submatch. |
- Precondition
- ready() == true
This function returns the offset from the beginning of the target sequence to the beginning of the submatch, unless the value of __sub
is zero (the default), in which case this function returns the offset from the beginning of the target sequence to the beginning of the match.
Definition at line 1838 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
Gets a sub_match representing the match prefix.
- Precondition
- ready() == true
This function gets a reference to a sub_match object representing the part of the target range between the start of the target range and the start of the match.
Definition at line 1883 of file regex.h.
Referenced by std::operator==().
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
Gets the number of matches and submatches.
The number of matches for a given regular expression will be either 0 if there was no match or mark_count() + 1 if a match was successful. Some matches may be empty.
- Returns
- the number of matches found.
Definition at line 1791 of file regex.h.
Referenced by std::operator==().
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
Gets the match or submatch converted to a string type.
- Parameters
-
__sub | indicates the submatch. |
- Precondition
- ready() == true
This function gets the submatch (or match, if __sub
is zero) extracted from the target range and converted to the associated string type.
Definition at line 1851 of file regex.h.
template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
Gets a sub_match representing the match suffix.
- Precondition
- ready() == true
This function gets a reference to a sub_match object representing the part of the target range between the end of the match and the end of the target range.
Definition at line 1898 of file regex.h.
Referenced by std::operator==().