libstdc++
|
Modules | |
Base and Implementation Classes | |
Namespaces | |
namespace | std::regex_constants |
Enumerations | |
enum class | _RegexExecutorPolicy : int { _S_auto , _S_alternate } |
Friends | |
void | std::regex_error::__throw_regex_error (regex_constants::error_type, const char *) |
10.? Public Types | |
typedef sub_match< _Bi_iter > | std::match_results< _Bi_iter, _Alloc >::value_type |
typedef const value_type & | std::match_results< _Bi_iter, _Alloc >::const_reference |
typedef const_reference | std::match_results< _Bi_iter, _Alloc >::reference |
typedef _Base_type::const_iterator | std::match_results< _Bi_iter, _Alloc >::const_iterator |
typedef const_iterator | std::match_results< _Bi_iter, _Alloc >::iterator |
typedef __iter_traits::difference_type | std::match_results< _Bi_iter, _Alloc >::difference_type |
typedef allocator_traits< _Alloc >::size_type | std::match_results< _Bi_iter, _Alloc >::size_type |
typedef _Alloc | std::match_results< _Bi_iter, _Alloc >::allocator_type |
typedef __iter_traits::value_type | std::match_results< _Bi_iter, _Alloc >::char_type |
typedef std::basic_string< char_type > | std::match_results< _Bi_iter, _Alloc >::string_type |
10.6 Swap | |
template<typename , typename , typename , bool > | |
class | std::match_results< _Bi_iter, _Alloc >::__detail::_Executor |
template<typename , typename , typename > | |
class | std::match_results< _Bi_iter, _Alloc >::regex_iterator |
template<typename _Bp , typename _Ap , typename _Cp , typename _Rp , __detail::_RegexExecutorPolicy , bool > | |
bool | std::match_results< _Bi_iter, _Alloc >::__detail::__regex_algo_impl (_Bp, _Bp, match_results< _Bp, _Ap > &, const basic_regex< _Cp, _Rp > &, regex_constants::match_flag_type) |
void | std::match_results< _Bi_iter, _Alloc >::swap (match_results &__that) |
28.10.2 Size | |
size_type | std::match_results< _Bi_iter, _Alloc >::size () const |
size_type | std::match_results< _Bi_iter, _Alloc >::max_size () const |
bool | std::match_results< _Bi_iter, _Alloc >::empty () const |
10.3 Element Access | |
difference_type | std::match_results< _Bi_iter, _Alloc >::length (size_type __sub=0) const |
difference_type | std::match_results< _Bi_iter, _Alloc >::position (size_type __sub=0) const |
string_type | std::match_results< _Bi_iter, _Alloc >::str (size_type __sub=0) const |
const_reference | std::match_results< _Bi_iter, _Alloc >::operator[] (size_type __sub) const |
const_reference | std::match_results< _Bi_iter, _Alloc >::prefix () const |
const_reference | std::match_results< _Bi_iter, _Alloc >::suffix () const |
const_iterator | std::match_results< _Bi_iter, _Alloc >::begin () const |
const_iterator | std::match_results< _Bi_iter, _Alloc >::cbegin () const |
const_iterator | std::match_results< _Bi_iter, _Alloc >::end () const |
const_iterator | std::match_results< _Bi_iter, _Alloc >::cend () const |
10.5 Allocator | |
allocator_type | std::match_results< _Bi_iter, _Alloc >::get_allocator () const |
A facility for performing regular expression pattern matching.
using std::__sub_match_string = typedef basic_string< typename iterator_traits<_Bi_iter>::value_type, _Ch_traits, _Ch_alloc> |
typedef std::ctype_base::mask std::regex_traits< _Ch_type >::_RegexMask::_BaseType |
typedef _Alloc std::match_results< _Bi_iter, _Alloc >::allocator_type |
typedef _RegexMask std::regex_traits< _Ch_type >::char_class_type |
typedef __iter_traits::value_type std::match_results< _Bi_iter, _Alloc >::char_type |
typedef match_results<const char*> std::cmatch |
typedef _Base_type::const_iterator std::match_results< _Bi_iter, _Alloc >::const_iterator |
typedef const value_type& std::match_results< _Bi_iter, _Alloc >::const_reference |
typedef sub_match<const char*> std::csub_match |
typedef __iter_traits::difference_type std::sub_match< _BiIter >::difference_type |
typedef __iter_traits::difference_type std::match_results< _Bi_iter, _Alloc >::difference_type |
typedef std::ptrdiff_t std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::difference_type |
typedef std::ptrdiff_t std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::difference_type |
typedef regex_constants::syntax_option_type std::basic_regex< _Ch_type, _Rx_traits >::flag_type |
typedef _BiIter std::sub_match< _BiIter >::iterator |
typedef const_iterator std::match_results< _Bi_iter, _Alloc >::iterator |
typedef std::forward_iterator_tag std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::iterator_category |
typedef std::forward_iterator_tag std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::iterator_category |
typedef std::locale std::regex_traits< _Ch_type >::locale_type |
typedef traits_type::locale_type std::basic_regex< _Ch_type, _Rx_traits >::locale_type |
typedef const value_type* std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::pointer |
typedef const value_type* std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::pointer |
typedef const_reference std::match_results< _Bi_iter, _Alloc >::reference |
typedef const value_type& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::reference |
typedef const value_type& std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::reference |
typedef basic_regex<char> std::regex |
typedef basic_regex<_Ch_type, _Rx_traits> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_type |
typedef basic_regex<_Ch_type, _Rx_traits> std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_type |
typedef allocator_traits<_Alloc>::size_type std::match_results< _Bi_iter, _Alloc >::size_type |
typedef match_results<string::const_iterator> std::smatch |
typedef regex_iterator<string::const_iterator> std::sregex_iterator |
typedef regex_token_iterator<string::const_iterator> std::sregex_token_iterator |
typedef sub_match<string::const_iterator> std::ssub_match |
typedef std::basic_string<char_type> std::regex_traits< _Ch_type >::string_type |
typedef traits_type::string_type std::basic_regex< _Ch_type, _Rx_traits >::string_type |
typedef std::basic_string<value_type> std::sub_match< _BiIter >::string_type |
typedef std::basic_string<char_type> std::match_results< _Bi_iter, _Alloc >::string_type |
typedef _Rx_traits std::basic_regex< _Ch_type, _Rx_traits >::traits_type |
typedef _Ch_type std::basic_regex< _Ch_type, _Rx_traits >::value_type |
typedef __iter_traits::value_type std::sub_match< _BiIter >::value_type |
typedef sub_match<_Bi_iter> std::match_results< _Bi_iter, _Alloc >::value_type |
typedef match_results<_Bi_iter> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::value_type |
typedef sub_match<_Bi_iter> std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::value_type |
typedef match_results<const wchar_t*> std::wcmatch |
typedef regex_iterator<const wchar_t*> std::wcregex_iterator |
typedef sub_match<const wchar_t*> std::wcsub_match |
typedef basic_regex<wchar_t> std::wregex |
typedef match_results<wstring::const_iterator> std::wsmatch |
typedef regex_iterator<wstring::const_iterator> std::wsregex_iterator |
typedef regex_token_iterator<wstring::const_iterator> std::wsregex_token_iterator |
typedef sub_match<wstring::const_iterator> std::wssub_match |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 232 of file regex_constants.h.
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 54 of file regex_constants.h.
The expression contained an invalid collating element name.
Definition at line 49 of file regex_error.h.
enum std::regex_constants::match_flag_type : unsigned int |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 255 of file regex_constants.h.
enum std::regex_constants::syntax_option_type : unsigned int |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 81 of file regex_constants.h.
|
inlineconstexpr |
|
inline |
Constructs a basic regular expression that does not match any character sequence.
Definition at line 428 of file regex.h.
Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Constructs a basic regular expression from the range [first, last) interpreted according to the flags in f
.
__first | The start of a range containing a valid regular expression. |
__last | The end of a range containing a valid regular expression. |
__f | The format flags of the regular expression. |
regex_error | if [__first, __last) is not a valid regular expression. |
|
defaultnoexcept |
Move-constructs a basic regular expression.
__rhs | A regex object. |
|
inlineexplicit |
Constructs a basic regular expression from the sequence [__p, __p + char_traits<_Ch_type>::length(__p)) interpreted according to the flags in __f
.
__p | A pointer to the start of a C-style null-terminated string containing a regular expression. |
__f | Flags indicating the syntax rules and options. |
regex_error | if __p is not a valid regular expression. |
|
inline |
Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the flags in f
.
__p | A pointer to the start of a string containing a regular expression. |
__len | The length of the string containing the regular expression. |
__f | Flags indicating the syntax rules and options. |
regex_error | if __p is not a valid regular expression. |
|
default |
Copy-constructs a basic regular expression.
__rhs | A regex object. |
|
inlineexplicit |
Constructs a basic regular expression from the string s
interpreted according to the flags in f
.
__s | A string containing a regular expression. |
__f | Flags indicating the syntax rules and options. |
regex_error | if __s is not a valid regular expression. |
|
inline |
|
inlineexplicit |
|
default |
Copy constructs a match_results.
|
defaultnoexcept |
Move constructs a match_results.
|
explicit |
Constructs a regex_error object.
__ecode | the regex error code. |
|
inline |
Provides a singular iterator, useful for indicating one-past-the-end of a range.
Definition at line 2496 of file regex.h.
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator().
|
inline |
Constructs a regex_iterator...
__a | [IN] The start of a text range to search. |
__b | [IN] One-past-the-end of the text range to search. |
__re | [IN] The regular expression to match. |
__m | [IN] Policy flags for match rules. |
Definition at line 2507 of file regex.h.
References std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator(), and std::regex_search().
|
default |
Copy constructs a regex_iterator.
|
inline |
|
inline |
Constructs a regex_token_iterator...
__a | [IN] The start of the text to search. |
__b | [IN] One-past-the-end of the text to search. |
__re | [IN] The regular expression to search for. |
__submatches | [IN] A list of subexpressions to return for each regular expression match within the text. |
__m | [IN] Policy flags for match rules. |
|
inline |
Constructs a regex_token_iterator...
__a | [IN] The start of the text to search. |
__b | [IN] One-past-the-end of the text to search. |
__re | [IN] The regular expression to search for. |
__submatches | [IN] A list of subexpressions to return for each regular expression match within the text. |
__m | [IN] Policy flags for match rules. |
|
inline |
Constructs a regex_token_iterator...
__a | [IN] The start of the text to search. |
__b | [IN] One-past-the-end of the text to search. |
__re | [IN] The regular expression to search for. |
__submatches | [IN] A list of subexpressions to return for each regular expression match within the text. |
__m | [IN] Policy flags for match rules. |
|
inline |
Constructs a regex_token_iterator...
__a | [IN] The start of the text to search. |
__b | [IN] One-past-the-end of the text to search. |
__re | [IN] The regular expression to search for. |
__submatch | [IN] Which submatch to return. There are some special values for this parameter:
|
__m | [IN] Policy flags for match rules. |
|
inline |
|
inline |
|
inlineconstexpr |
|
inline |
|
inline |
bool std::__detail::__regex_algo_impl | ( | _BiIter | __s, |
_BiIter | __e, | ||
match_results< _BiIter, _Alloc > & | __m, | ||
const basic_regex< _CharT, _TraitsT > & | __re, | ||
regex_constants::match_flag_type | __flags | ||
) |
|
inline |
Definition at line 173 of file regex_error.h.
|
inline |
Assigns a new regular expression to a regex object.
__first | The start of a range containing a valid regular expression. |
__last | The end of a range containing a valid regular expression. |
__flags | Syntax option flags. |
regex_error | if p does not contain a valid regular expression pattern interpreted according to __flags . If regex_error is thrown, the object remains unchanged. |
Definition at line 677 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inlinenoexcept |
The move-assignment operator.
__rhs | Another regular expression object. |
Definition at line 601 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::swap().
|
inline |
Assigns a new regular expression to a regex object from a C-style null-terminated string containing a regular expression pattern.
__p | A pointer to a C-style null-terminated string containing a regular expression pattern. |
__flags | Syntax option flags. |
regex_error | if __p does not contain a valid regular expression pattern interpreted according to __flags . If regex_error is thrown, *this remains unchanged. |
Definition at line 622 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Assigns a new regular expression to a regex object from a C-style string containing a regular expression pattern.
__p | A pointer to a C-style string containing a regular expression pattern. |
__len | The length of the regular expression pattern string. |
__flags | Syntax option flags. |
regex_error | if p does not contain a valid regular expression pattern interpreted according to __flags . If regex_error is thrown, *this remains unchanged. |
Definition at line 639 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
the real assignment operator.
__rhs | Another regular expression object. |
Definition at line 588 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::swap().
Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_regex< _Ch_type, _Rx_traits >::operator=(), std::basic_regex< _Ch_type, _Rx_traits >::operator=(), std::basic_regex< _Ch_type, _Rx_traits >::operator=(), std::basic_regex< _Ch_type, _Rx_traits >::operator=(), and std::basic_regex< _Ch_type, _Rx_traits >::operator=().
|
inline |
Assigns a new regular expression to a regex object from a string containing a regular expression pattern.
__s | A string containing a regular expression pattern. |
__flags | Syntax option flags. |
regex_error | if __s does not contain a valid regular expression pattern interpreted according to __flags . If regex_error is thrown, *this remains unchanged. |
Definition at line 655 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::basic_regex(), and std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Assigns a new regular expression to a regex object.
__l | An initializer list representing a regular expression. |
__flags | Syntax option flags. |
regex_error | if __l does not contain a valid regular expression pattern interpreted according to __flags . If regex_error is thrown, the object remains unchanged. |
Definition at line 693 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Gets an iterator to the start of the sub_match collection.
Definition at line 1779 of file regex.h.
Referenced by std::match_results< _Bi_iter, _Alloc >::cbegin().
|
inline |
Gets an iterator to the start of the sub_match collection.
Definition at line 1786 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::begin().
|
inline |
Gets an iterator to one-past-the-end of the collection.
Definition at line 1800 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::end().
|
inline |
Gets the regex error code.
Definition at line 156 of file regex_error.h.
|
inline |
Compares this sub_match to a string.
__s | A string to compare to this sub_match. |
<0 | this matched sequence will collate before __s . |
=0 | this matched sequence is equivalent to __s . |
<0 | this matched sequence will collate after __s . |
Definition at line 938 of file regex.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare(), and std::sub_match< _BiIter >::str().
|
inline |
Compares this and another matched sequence.
__s | Another matched sequence to compare to this one. |
<0 | this matched sequence will collate before __s . |
=0 | this matched sequence is equivalent to __s . |
<0 | this matched sequence will collate after __s . |
Definition at line 925 of file regex.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare(), and std::sub_match< _BiIter >::str().
|
inline |
Compares this sub_match to a C-style string.
__s | A C-style string to compare to this sub_match. |
<0 | this matched sequence will collate before __s . |
=0 | this matched sequence is equivalent to __s . |
<0 | this matched sequence will collate after __s . |
Definition at line 951 of file regex.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare(), and std::sub_match< _BiIter >::str().
|
inline |
Indicates if the match_results contains no results.
true | The match_results object is empty. |
false | The match_results object is not empty. |
Definition at line 1675 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::size().
Referenced by std::match_results< _Bi_iter, _Alloc >::end(), std::match_results< _Bi_iter, _Alloc >::prefix(), and std::match_results< _Bi_iter, _Alloc >::suffix().
|
inline |
Gets an iterator to one-past-the-end of the collection.
Definition at line 1793 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::empty().
Referenced by std::match_results< _Bi_iter, _Alloc >::cend().
|
constexpr |
The expression contained an invalid back reference.
|
constexpr |
The expression contained an invalid range in a {} expression.
|
constexpr |
One of *?+{ was not preceded by a valid regular expression.
|
constexpr |
The expression contained mismatched { and }
|
constexpr |
The expression contained mismatched [ and ].
|
constexpr |
The expression contained an invalid collating element name.
|
constexpr |
The complexity of an attempted match against a regular expression exceeded a pre-set level.
|
constexpr |
The expression contained an invalid character class name.
|
constexpr |
The expression contained an invalid escaped character, or a trailing escape.
|
constexpr |
The expression contained mismatched ( and ).
|
constexpr |
The expression contained an invalid character range, such as [b-a] in most encodings.
|
constexpr |
There was insufficient memory to convert the expression into a finite state machine.
|
constexpr |
There was insufficient memory to determine whether the regular expression could match the specified character sequence.
|
inline |
|
inline |
Definition at line 1829 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::format().
_Out_iter std::match_results< _Bi_iter, _Alloc >::format | ( | _Out_iter | __out, |
const char_type * | __fmt_first, | ||
const char_type * | __fmt_last, | ||
match_flag_type | __flags = regex_constants::format_default |
||
) | const |
Referenced by std::match_results< _Bi_iter, _Alloc >::format(), std::match_results< _Bi_iter, _Alloc >::format(), and std::match_results< _Bi_iter, _Alloc >::format().
|
inline |
Definition at line 1841 of file regex.h.
References std::back_inserter(), and std::match_results< _Bi_iter, _Alloc >::format().
|
inline |
Definition at line 1853 of file regex.h.
References std::back_inserter(), and std::match_results< _Bi_iter, _Alloc >::format().
|
inline |
|
inline |
|
inline |
|
inline |
Imbues the regex_traits object with a copy of a new locale.
__loc | A locale. |
|
inline |
bool std::regex_traits< _Ch_type >::isctype | ( | _Ch_type | __c, |
char_class_type | __f | ||
) | const |
Determines if c
is a member of an identified class.
__c | a character. |
__f | a class type (as returned from lookup_classname). |
__c
is a member of the classification represented by __f
, false otherwise.std::bad_cast | if the current locale does not have a ctype facet. |
|
inline |
Gets the length of the matching sequence.
Definition at line 882 of file regex.h.
References std::distance(), std::pair< _BiIter, _BiIter >::first, and std::pair< _BiIter, _BiIter >::second.
|
inlinestatic |
Gives the length of a C-style string starting at __p
.
__p | a pointer to the start of a character sequence. |
*__p
and the first default-initialized value of type char_type
. In other words, uses the C-string algorithm for determining the length of a sequence of characters.
|
inline |
regex_traits< _Ch_type >::char_class_type std::regex_traits< _Ch_type >::lookup_classname | ( | _Fwd_iter | __first, |
_Fwd_iter | __last, | ||
bool | __icase = false |
||
) | const |
Maps one or more characters to a named character classification.
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
__icase | ignores the case of the classification name. |
icase
is true, the returned mask identifies the classification regardless of the case of the characters to be matched (for example, [[:lower:]] is the same as [[:alpha:]]), otherwise a case-dependent classification is returned. The value returned shall be independent of the case of the characters in the character sequence. If the name is not recognized then returns a value that compares equal to 0.At least the following names (or their wide-character equivalent) are supported.
regex_traits< _Ch_type >::string_type std::regex_traits< _Ch_type >::lookup_collatename | ( | _Fwd_iter | __first, |
_Fwd_iter | __last | ||
) | const |
Gets a collation element by name.
__first | beginning of the collation element name. |
__last | one-past-the-end of the collation element name. |
|
inline |
|
inline |
|
inline |
Gets the matching sequence as a string.
This is the implicit conversion operator. It is identical to the str() member function except that it will want to pop up in unexpected places and cause a great deal of confusion and cursing from the unwary.
Definition at line 895 of file regex.h.
References std::pair< _BiIter, _BiIter >::first, and std::pair< _BiIter, _BiIter >::second.
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 372 of file regex_constants.h.
|
inlineconstexpr |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 183 of file regex_constants.h.
|
inline |
|
inline |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 397 of file regex_constants.h.
|
inline |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 208 of file regex_constants.h.
|
inline |
|
inline |
regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ | ( | ) |
Increments a regex_iterator.
Definition at line 512 of file regex.tcc.
References std::regex_constants::match_continuous, std::regex_constants::match_not_null, std::regex_constants::match_prev_avail, and std::regex_search().
regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > & std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Move-assigns one regular expression to another.
Definition at line 544 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Replaces a regular expression with a new one constructed from a C-style null-terminated string.
__p | A pointer to the start of a null-terminated C-style string containing a regular expression. |
Definition at line 555 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Assigns one regular expression to another.
Definition at line 537 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
Replaces a regular expression with a new one constructed from a string.
__s | A pointer to a string containing a regular expression. |
Definition at line 578 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
default |
Assigns rhs to *this.
|
default |
Assigns one regex_iterator to another.
regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > & std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= | ( | const regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > & | __rhs | ) |
|
inline |
Replaces a regular expression with a new one constructed from an initializer list.
__l | The initializer list. |
regex_error | if __l is not a valid regular expression. |
Definition at line 567 of file regex.h.
References std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
default |
Move-assigns rhs to *this.
|
inlineconstexpr |
|
inline |
|
inline |
bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== | ( | const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & | __rhs | ) | const |
bool std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== | ( | const regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > & | __rhs | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gets a sub_match reference for the match or submatch.
__sub | indicates the submatch. |
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 1737 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::ready(), and std::match_results< _Bi_iter, _Alloc >::size().
|
inlineconstexpr |
|
inlineconstexpr |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 386 of file regex_constants.h.
|
inlineconstexpr |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 197 of file regex_constants.h.
|
inline |
|
inline |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 405 of file regex_constants.h.
|
inline |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 216 of file regex_constants.h.
|
inlineconstexpr |
|
inlineconstexpr |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 379 of file regex_constants.h.
|
inlineconstexpr |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 190 of file regex_constants.h.
|
inline |
|
inline |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 401 of file regex_constants.h.
|
inline |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 212 of file regex_constants.h.
|
inlineconstexpr |
|
inlineconstexpr |
This is a bitmask type indicating regex matching rules.
The match_flag_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
Definition at line 393 of file regex_constants.h.
|
inlineconstexpr |
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type
is implementation defined but it is valid to perform bitwise operations on these values and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript
, basic
, extended
, awk
, grep
, egrep
set.
Definition at line 204 of file regex_constants.h.
|
inline |
Gets the offset of the beginning of the indicated submatch.
__sub | indicates the submatch. |
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 1709 of file regex.h.
References std::distance().
|
inline |
Gets a sub_match representing the match prefix.
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 1754 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::empty(), and std::match_results< _Bi_iter, _Alloc >::ready().
|
inline |
Indicates if the match_results is ready.
true | The object has a fully-established result state. |
false | The object is not ready. |
Definition at line 1645 of file regex.h.
Referenced by std::match_results< _Bi_iter, _Alloc >::operator[](), std::match_results< _Bi_iter, _Alloc >::prefix(), and std::match_results< _Bi_iter, _Alloc >::suffix().
|
inline |
Indicates if there is a match between the regular expression e
and all of the character sequence [first, last).
__first | Beginning of the character sequence to match. |
__last | One-past-the-end of the character sequence to match. |
__re | The regular expression. |
__flags | Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2056 of file regex.h.
References std::regex_match().
|
inline |
Determines if there is a match between the regular expression e
and all of the character sequence [first, last).
__s | Start of the character sequence to match. |
__e | One-past-the-end of the character sequence to match. |
__m | The match results. |
__re | The regular expression. |
__flags | Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2028 of file regex.h.
Referenced by std::regex_match(), std::regex_match(), std::regex_match(), std::regex_match(), and std::regex_match().
|
inline |
Indicates if there is a match between the regular expression e
and a C-style null-terminated string.
__s | The C-style null-terminated string to match. |
__re | The regular expression. |
__f | Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2141 of file regex.h.
References std::regex_match().
|
inline |
Determines if there is a match between the regular expression e
and a C-style null-terminated string.
__s | The C-style null-terminated string to match. |
__m | The match results. |
__re | The regular expression. |
__f | Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2081 of file regex.h.
References std::regex_match().
|
delete |
Prevent unsafe attempts to get match_results from a temporary string.
|
inline |
Determines if there is a match between the regular expression e
and a string.
__s | The string to match. |
__m | The match results. |
__re | The regular expression. |
__flags | Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2105 of file regex.h.
References std::regex_match().
|
inline |
Indicates if there is a match between the regular expression e
and a string.
__s | [IN] The string to match. |
__re | [IN] The regular expression. |
__flags | [IN] Controls how the regular expression is matched. |
true | A match exists. |
false | Otherwise. |
an | exception of type regex_error. |
Definition at line 2163 of file regex.h.
References std::regex_match().
_Out_iter std::regex_replace | ( | _Out_iter | __out, |
_Bi_iter | __first, | ||
_Bi_iter | __last, | ||
const basic_regex< _Ch_type, _Rx_traits > & | __e, | ||
const _Ch_type * | __fmt, | ||
regex_constants::match_flag_type | __flags = regex_constants::match_default |
||
) |
Search for a regular expression within a range for multiple times, and replace the matched parts through filling a format C-string.
__out | [OUT] The output iterator. |
__first | [IN] The start of the string to search. |
__last | [IN] One-past-the-end of the string to search. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format C-string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 459 of file regex.tcc.
References std::regex_constants::format_first_only, and std::regex_constants::format_no_copy.
|
inline |
Search for a regular expression within a range for multiple times, and replace the matched parts through filling a format string.
__out | [OUT] The output iterator. |
__first | [IN] The start of the string to search. |
__last | [IN] One-past-the-end of the string to search. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 2334 of file regex.h.
References std::regex_replace().
Referenced by std::regex_replace(), std::regex_replace(), std::regex_replace(), std::regex_replace(), and std::regex_replace().
|
inline |
Search for a regular expression within a C-string for multiple times, and replace the matched parts through filling a format C-string.
__s | [IN] The C-string to search and replace. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format C-string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 2457 of file regex.h.
References std::back_inserter(), and std::regex_replace().
|
inline |
Search for a regular expression within a C-string for multiple times, and replace the matched parts through filling a format string.
__s | [IN] The C-string to search and replace. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 2431 of file regex.h.
References std::back_inserter(), and std::regex_replace().
|
inline |
Search for a regular expression within a string for multiple times, and replace the matched parts through filling a format C-string.
__s | [IN] The string to search and replace. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format C-string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 2405 of file regex.h.
References std::back_inserter(), and std::regex_replace().
|
inline |
Search for a regular expression within a string for multiple times, and replace the matched parts through filling a format string.
__s | [IN] The string to search and replace. |
__e | [IN] The regular expression to search for. |
__fmt | [IN] The format string. |
__flags | [IN] Search and replace policy flags. |
an | exception of type regex_error. |
Definition at line 2379 of file regex.h.
References std::back_inserter(), and std::regex_replace().
|
inline |
Searches for a regular expression within a range.
__first | [IN] The start of the string to search. |
__last | [IN] One-past-the-end of the string to search. |
__re | [IN] The regular expression to search for. |
__flags | [IN] Search policy flags. |
true | A match was found within the string. |
false | No match was found within the string. |
an | exception of type regex_error. |
Definition at line 2210 of file regex.h.
References std::regex_search().
|
inline |
Searches for a regular expression within a range.
__s | [IN] The start of the string to search. |
__e | [IN] One-past-the-end of the string to search. |
__m | [OUT] The match results. |
__re | [IN] The regular expression to search for. |
__flags | [IN] Search policy flags. |
true | A match was found within the string. |
false | No match was found within the string, the content of m is undefined. |
an | exception of type regex_error. |
Definition at line 2186 of file regex.h.
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator(), std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++(), std::regex_search(), std::regex_search(), std::regex_search(), std::regex_search(), and std::regex_search().
|
inline |
Searches for a regular expression within a C-string.
__s | [IN] The C-string to search. |
__e | [IN] The regular expression to search for. |
__f | [IN] Search policy flags. |
true | A match was found within the string. |
false | No match was found within the string. |
an | exception of type regex_error. |
Definition at line 2252 of file regex.h.
References std::regex_search().
|
inline |
Searches for a regular expression within a C-string.
__s | [IN] A C-string to search for the regex. |
__m | [OUT] The set of regex matches. |
__e | [IN] The regex to search for in s . |
__f | [IN] The search flags. |
true | A match was found within the string. |
false | No match was found within the string, the content of m is undefined. |
an | exception of type regex_error. |
Definition at line 2233 of file regex.h.
References std::regex_search().
|
delete |
Prevent unsafe attempts to get match_results from a temporary string.
|
inline |
Searches for a regular expression within a string.
__s | [IN] A C++ string to search for the regex. |
__m | [OUT] The set of regex matches. |
__e | [IN] The regex to search for in s . |
__f | [IN] The search flags. |
true | A match was found within the string. |
false | No match was found within the string, the content of m is undefined. |
an | exception of type regex_error. |
Definition at line 2294 of file regex.h.
References std::regex_search().
|
inline |
Searches for a regular expression within a string.
__s | [IN] The string to search. |
__e | [IN] The regular expression to search for. |
__flags | [IN] Search policy flags. |
true | A match was found within the string. |
false | No match was found within the string. |
an | exception of type regex_error. |
Definition at line 2271 of file regex.h.
References std::regex_search().
|
inline |
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.
Definition at line 1662 of file regex.h.
Referenced by std::match_results< _Bi_iter, _Alloc >::empty(), and std::match_results< _Bi_iter, _Alloc >::operator[]().
|
inline |
Gets the matching sequence as a string.
Definition at line 908 of file regex.h.
References std::pair< _BiIter, _BiIter >::first, and std::pair< _BiIter, _BiIter >::second.
Referenced by std::sub_match< _BiIter >::compare(), std::sub_match< _BiIter >::compare(), and std::sub_match< _BiIter >::compare().
|
inline |
Gets the match or submatch converted to a string type.
__sub | indicates the submatch. |
This function gets the submatch (or match, if __sub
is zero) extracted from the target range and converted to the associated string type.
|
inline |
Gets a sub_match representing the match suffix.
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 1769 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::empty(), and std::match_results< _Bi_iter, _Alloc >::ready().
|
inline |
Swaps the contents of two regular expression objects.
__rhs | Another regular expression object. |
Definition at line 746 of file regex.h.
Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::assign().
|
inline |
|
inline |
Swaps the contents of two match_results.
Definition at line 1889 of file regex.h.
References std::match_results< _Bi_iter, _Alloc >::swap().
Referenced by std::match_results< _Bi_iter, _Alloc >::swap().
|
inline |
|
inline |
Gets a sort key for a character sequence.
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) < v.transform(H1, H2).
What this really does is provide a more efficient way to compare a string to multiple other strings in locales with fancy collation rules and equivalence classes.
std::bad_cast | if the current locale does not have a collate facet. |
Definition at line 230 of file regex.h.
Referenced by std::regex_traits< _Ch_type >::transform_primary().
|
inline |
Gets a sort key for a character sequence, independent of case.
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
Effects: if typeid(use_facet<collate<_Ch_type> >) == typeid(collate_byname<_Ch_type>) and the form of the sort key returned by collate_byname<_Ch_type>::transform(__first, __last) is known and can be converted into a primary sort key then returns that key, otherwise returns an empty string.
Definition at line 254 of file regex.h.
References std::regex_traits< _Ch_type >::transform().
|
inline |
|
inline |
int std::regex_traits< _Ch_type >::value | ( | _Ch_type | __ch, |
int | __radix | ||
) | const |
Converts a digit to an int.
__ch | a character representing a digit. |
__radix | the radix if the numeric conversion (limited to 8, 10, or 16). |
Definition at line 344 of file regex.tcc.
References std::hex(), and std::oct().
|
constexpr |
Extension: Ensure both space complexity of compiled regex and time complexity execution are not exponential. If specified in a regex with back-references, the exception regex_constants::error_complexity will be thrown.
Definition at line 179 of file regex_constants.h.
_BaseType std::regex_traits< _Ch_type >::_RegexMask::_M_base |
unsigned char std::regex_traits< _Ch_type >::_RegexMask::_M_extended |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is identical to syntax_option_type extended, except that C-style escape sequences are supported. These sequences are: \\, \a, \b, \f, \n, \r, \t , \v, \&apos,, &apos,, and \ddd (where ddd is one, two, or three octal digits).
Definition at line 152 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX), Base Definitions and Headers, Section 9, Regular Expressions [IEEE, Information Technology – Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
Definition at line 132 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that character ranges of the form [a-b] should be locale sensitive.
Definition at line 111 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript Language Specification, Standard Ecma-262, third edition, 1999], as modified in section [28.13]. This grammar is similar to that defined in the PERL scripting language but extended with elements found in the POSIX regular expression grammar.
Definition at line 122 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by POSIX utility grep when given the -E option in IEEE Std 1003.1-2001. This option is identical to syntax_option_type extended, except that newlines are treated as whitespace.
Definition at line 170 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by POSIX extended regular expressions in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX), Base Definitions and Headers, Section 9, Regular Expressions.
Definition at line 141 of file regex_constants.h.
|
constexpr |
When a regular expression match is to be replaced by a new string, the new string is constructed using the rules used by the ECMAScript replace function in ECMA- 262 [Ecma International, ECMAScript Language Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11 String.prototype.replace. In addition, during search and replace operations all non-overlapping occurrences of the regular expression are located and replaced, and sections of the input that did not match the expression are copied unchanged to the output string.
Format strings (from ECMA-262 [15.5.4.11]):
Definition at line 345 of file regex_constants.h.
|
constexpr |
When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced.
Definition at line 368 of file regex_constants.h.
Referenced by std::regex_replace().
|
constexpr |
During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string.
Definition at line 361 of file regex_constants.h.
Referenced by std::regex_replace().
|
constexpr |
When a regular expression match is to be replaced by a new string, the new string is constructed using the rules used by the POSIX sed utility in IEEE Std 1003.1- 2001 [IEEE, Information Technology – Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
Definition at line 353 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the grammar recognized by the regular expression engine is that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is identical to syntax_option_type basic, except that newlines are treated as whitespace.
Definition at line 161 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the matching of regular expressions against a character sequence shall be performed without regard to case.
Definition at line 87 of file regex_constants.h.
|
constexpr |
If more than one match is possible then any match is an acceptable result.
Definition at line 296 of file regex_constants.h.
|
constexpr |
The expression only matches a sub-sequence that begins at first .
Definition at line 308 of file regex_constants.h.
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++().
|
constexpr |
The default matching rules.
Definition at line 260 of file regex_constants.h.
|
constexpr |
The first character in the sequence [first, last) is treated as though it is not at the beginning of a line, so the character (^) in the regular expression shall not match [first, first).
Definition at line 267 of file regex_constants.h.
|
constexpr |
The expression \b is not matched against the sub-sequence [first,first).
Definition at line 282 of file regex_constants.h.
|
constexpr |
The last character in the sequence [first, last) is treated as though it is not at the end of a line, so the character ($) in the regular expression shall not match [last, last).
Definition at line 275 of file regex_constants.h.
|
constexpr |
The expression \b should not be matched against the sub-sequence [last,last).
Definition at line 289 of file regex_constants.h.
|
constexpr |
The expression does not match an empty sequence.
Definition at line 302 of file regex_constants.h.
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++().
|
constexpr |
–first is a valid iterator position. When this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms 28.11 and iterators 28.12.
Definition at line 316 of file regex_constants.h.
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++().
bool std::sub_match< _BiIter >::matched |
|
staticconstexpr |
|
constexpr |
Specifies that when a regular expression is matched against a character container sequence, no sub-expression matches are to be stored in the supplied match_results structure.
Definition at line 95 of file regex_constants.h.
|
staticconstexpr |
|
constexpr |
Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output.
Definition at line 104 of file regex_constants.h.
|
friend |
Constructs a basic regular expression that does not match any character sequence.
|
friend |
Swaps the contents of two match_results.
|
friend |
|
friend |
|
friend |
Definition at line 173 of file regex_error.h.