libstdc++
Regular Expressions
Collaboration diagram for Regular Expressions:

Modules

 Base and Implementation Classes
 

Classes

class  std::__detail::_Executor< _BiIter, _Alloc, _TraitsT, __dfs_mode >
 

Typedefs

typedef std::ctype_base::mask std::regex_traits< _Ch_type >::_RegexMask::_BaseType
 
typedef _RegexMask std::regex_traits< _Ch_type >::char_class_type
 
typedef _Ch_type std::regex_traits< _Ch_type >::char_type
 
typedef sub_match< const char * > std::csub_match
 
typedef __iter_traits::difference_type std::sub_match< _BiIter >::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 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_typestd::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::pointer
 
typedef const value_type & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::reference
 
typedef const value_typestd::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 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 basic_string< value_type > std::sub_match< _BiIter >::string_type
 
typedef _Rx_traits std::basic_regex< _Ch_type, _Rx_traits >::traits_type
 
using std::sub_match< _BiIter >::__string_view::traits_type = typename string_type::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 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 sub_match< const wchar_t * > std::wcsub_match
 
typedef basic_regex< wchar_t > std::wregex
 
typedef sub_match< wstring::const_iterator > std::wssub_match
 

Enumerations

enum class  _RegexExecutorPolicy : int { _S_auto , _S_alternate }
 

Functions

 std::sub_match< _BiIter >::__string_view::__string_view (const string_type &__s) noexcept
 
 std::sub_match< _BiIter >::__string_view::__string_view (const value_type *__s) noexcept
 
 std::sub_match< _BiIter >::__string_view::__string_view (const value_type *__s, size_t __n) noexcept
 
constexpr std::regex_traits< _Ch_type >::_RegexMask::_RegexMask (_BaseType __base=0, unsigned char __extended=0)
 
 std::regex_error::regex_error (regex_constants::error_type __ecode)
 
 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator ()=default
 
 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, regex_constants::match_flag_type __m=regex_constants::match_default)
 
 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator (_Bi_iter, _Bi_iter, const regex_type &&, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator (const regex_iterator &)=default
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ()
 
template<std::size_t _Nm>
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, const int(&__submatches)[_Nm], regex_constants::match_flag_type __m=regex_constants::match_default)
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, const std::vector< int > &__submatches, regex_constants::match_flag_type __m=regex_constants::match_default)
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, initializer_list< int > __submatches, regex_constants::match_flag_type __m=regex_constants::match_default)
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, int __submatch=0, regex_constants::match_flag_type __m=regex_constants::match_default)
 
template<std::size_t _Nm>
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, const int(&)[_Nm], regex_constants::match_flag_type=regex_constants::match_default)=delete
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, const std::vector< int > &, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, initializer_list< int >, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, int=0, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
 std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator (const regex_token_iterator &__rhs)
 
 std::regex_traits< _Ch_type >::regex_traits ()
 
template<typename _BiIter , typename _Alloc , typename _CharT , typename _TraitsT , _RegexExecutorPolicy __policy, bool __match_mode>
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)
 
void std::__throw_regex_error (regex_constants::error_type __ecode)
 
void std::__throw_regex_error (regex_constants::error_type __ecode, const char *__what)
 
regex_constants::error_type std::regex_error::code () const
 
int std::sub_match< _BiIter >::__string_view::compare (__string_view __s) const noexcept
 
int std::sub_match< _BiIter >::compare (const sub_match &__s) const
 
locale_type std::regex_traits< _Ch_type >::getloc () const
 
locale_type std::regex_traits< _Ch_type >::imbue (locale_type __loc)
 
bool std::regex_traits< _Ch_type >::isctype (_Ch_type __c, char_class_type __f) const
 
difference_type std::sub_match< _BiIter >::length () const noexcept
 
static std::size_t std::regex_traits< _Ch_type >::length (const char_type *__p)
 
template<typename _Fwd_iter >
char_class_type std::regex_traits< _Ch_type >::lookup_classname (_Fwd_iter __first, _Fwd_iter __last, bool __icase=false) const
 
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::lookup_collatename (_Fwd_iter __first, _Fwd_iter __last) const
 
 std::sub_match< _BiIter >::operator string_type () const
 
constexpr bool std::regex_traits< _Ch_type >::_RegexMask::operator!= (_RegexMask __other) const
 
bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator!= (const regex_iterator &__rhs) const noexcept
 
bool std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator!= (const regex_token_iterator &__rhs) const
 
constexpr _RegexMask std::regex_traits< _Ch_type >::_RegexMask::operator& (_RegexMask __other) const
 
_RegexMask & std::regex_traits< _Ch_type >::_RegexMask::operator&= (_RegexMask __other)
 
const value_typestd::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* () const
 
const value_type & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* () const noexcept
 
regex_iteratorstd::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ()
 
regex_token_iteratorstd::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ()
 
regex_iterator std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ (int)
 
regex_token_iterator std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ (int)
 
const value_typestd::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> () const
 
const value_type * std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> () const noexcept
 
regex_iteratorstd::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= (const regex_iterator &)=default
 
regex_token_iteratorstd::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= (const regex_token_iterator &__rhs)
 
constexpr bool std::regex_traits< _Ch_type >::_RegexMask::operator== (_RegexMask __other) const
 
bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== (const regex_iterator &) const noexcept
 
bool std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== (const regex_token_iterator &__rhs) const
 
constexpr _RegexMask std::regex_traits< _Ch_type >::_RegexMask::operator^ (_RegexMask __other) const
 
_RegexMask & std::regex_traits< _Ch_type >::_RegexMask::operator^= (_RegexMask __other)
 
constexpr _RegexMask std::regex_traits< _Ch_type >::_RegexMask::operator| (_RegexMask __other) const
 
_RegexMask & std::regex_traits< _Ch_type >::_RegexMask::operator|= (_RegexMask __other)
 
constexpr _RegexMask std::regex_traits< _Ch_type >::_RegexMask::operator~ () const
 
string_type std::sub_match< _BiIter >::str () const
 
template<typename _Ch_type , typename _Rx_traits >
void swap (basic_regex< _Ch_type, _Rx_traits > &__lhs, basic_regex< _Ch_type, _Rx_traits > &__rhs)
 
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::transform (_Fwd_iter __first, _Fwd_iter __last) const
 
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::transform_primary (_Fwd_iter __first, _Fwd_iter __last) const
 
char_type std::regex_traits< _Ch_type >::translate (char_type __c) const
 
char_type std::regex_traits< _Ch_type >::translate_nocase (char_type __c) const
 
int std::regex_traits< _Ch_type >::value (_Ch_type __ch, int __radix) const
 

Variables

_BaseType std::regex_traits< _Ch_type >::_RegexMask::_M_base
 
unsigned char std::regex_traits< _Ch_type >::_RegexMask::_M_extended
 
locale_type std::regex_traits< _Ch_type >::_M_locale
 
static constexpr unsigned char std::regex_traits< _Ch_type >::_RegexMask::_S_under
 
static constexpr unsigned char std::regex_traits< _Ch_type >::_RegexMask::_S_valid_mask
 
bool std::sub_match< _BiIter >::matched
 

Friends

void std::regex_error::__throw_regex_error (regex_constants::error_type, const char *)
 

5.1 Regular Expression Syntax Options

enum  std::regex_constants::__syntax_option {
  _S_icase , _S_nosubs , _S_optimize , _S_collate ,
  _S_ECMAScript , _S_basic , _S_extended , _S_awk ,
  _S_grep , _S_egrep , _S_polynomial , _S_syntax_last
}
 
enum  std::regex_constants::syntax_option_type : unsigned int
 
constexpr syntax_option_type std::regex_constants::icase
 
constexpr syntax_option_type std::regex_constants::nosubs
 
constexpr syntax_option_type std::regex_constants::optimize
 
constexpr syntax_option_type std::regex_constants::collate
 
constexpr syntax_option_type std::regex_constants::ECMAScript
 
constexpr syntax_option_type std::regex_constants::basic
 
constexpr syntax_option_type std::regex_constants::extended
 
constexpr syntax_option_type std::regex_constants::awk
 
constexpr syntax_option_type std::regex_constants::grep
 
constexpr syntax_option_type std::regex_constants::egrep
 
constexpr syntax_option_type std::regex_constants::__polynomial
 
constexpr syntax_option_type std::regex_constants::operator& (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator| (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator^ (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator~ (syntax_option_type __a)
 
syntax_option_typestd::regex_constants::operator&= (syntax_option_type &__a, syntax_option_type __b)
 
syntax_option_typestd::regex_constants::operator|= (syntax_option_type &__a, syntax_option_type __b)
 
syntax_option_typestd::regex_constants::operator^= (syntax_option_type &__a, syntax_option_type __b)
 

5.2 Matching Rules

Matching a regular expression against a sequence of characters [first, last) proceeds according to the rules of the grammar specified for the regular expression object, modified according to the effects listed below for any bitmask elements set.

enum  std::regex_constants::__match_flag {
  _S_not_bol , _S_not_eol , _S_not_bow , _S_not_eow ,
  _S_any , _S_not_null , _S_continuous , _S_prev_avail ,
  _S_sed , _S_no_copy , _S_first_only , _S_match_flag_last
}
 
enum  std::regex_constants::match_flag_type : unsigned int
 
constexpr match_flag_type std::regex_constants::match_default
 
constexpr match_flag_type std::regex_constants::match_not_bol
 
constexpr match_flag_type std::regex_constants::match_not_eol
 
constexpr match_flag_type std::regex_constants::match_not_bow
 
constexpr match_flag_type std::regex_constants::match_not_eow
 
constexpr match_flag_type std::regex_constants::match_any
 
constexpr match_flag_type std::regex_constants::match_not_null
 
constexpr match_flag_type std::regex_constants::match_continuous
 
constexpr match_flag_type std::regex_constants::match_prev_avail
 
constexpr match_flag_type std::regex_constants::format_default
 
constexpr match_flag_type std::regex_constants::format_sed
 
constexpr match_flag_type std::regex_constants::format_no_copy
 
constexpr match_flag_type std::regex_constants::format_first_only
 
constexpr match_flag_type std::regex_constants::operator& (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator| (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator^ (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator~ (match_flag_type __a)
 
match_flag_typestd::regex_constants::operator&= (match_flag_type &__a, match_flag_type __b)
 
match_flag_typestd::regex_constants::operator|= (match_flag_type &__a, match_flag_type __b)
 
match_flag_typestd::regex_constants::operator^= (match_flag_type &__a, match_flag_type __b)
 

5.3 Error Types

enum  std::regex_constants::error_type {
  _S_error_collate , _S_error_ctype , _S_error_escape , _S_error_backref ,
  _S_error_brack , _S_error_paren , _S_error_brace , _S_error_badbrace ,
  _S_error_range , _S_error_space , _S_error_badrepeat , _S_error_complexity ,
  _S_error_stack
}
 
constexpr error_type std::regex_constants::error_collate (_S_error_collate)
 
constexpr error_type std::regex_constants::error_ctype (_S_error_ctype)
 
constexpr error_type std::regex_constants::error_escape (_S_error_escape)
 
constexpr error_type std::regex_constants::error_backref (_S_error_backref)
 
constexpr error_type std::regex_constants::error_brack (_S_error_brack)
 
constexpr error_type std::regex_constants::error_paren (_S_error_paren)
 
constexpr error_type std::regex_constants::error_brace (_S_error_brace)
 
constexpr error_type std::regex_constants::error_badbrace (_S_error_badbrace)
 
constexpr error_type std::regex_constants::error_range (_S_error_range)
 
constexpr error_type std::regex_constants::error_space (_S_error_space)
 
constexpr error_type std::regex_constants::error_badrepeat (_S_error_badrepeat)
 
constexpr error_type std::regex_constants::error_complexity (_S_error_complexity)
 
constexpr error_type std::regex_constants::error_stack (_S_error_stack)
 

Constants

std [28.8.1](1)

static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::icase
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::nosubs
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::optimize
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::collate
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::ECMAScript
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::basic
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::extended
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::awk
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::grep
 
static constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::egrep
 
template<typename , typename , typename , bool >
class std::basic_regex< _Ch_type, _Rx_traits >::__detail::_Executor
 
template<typename _Bp , typename _Ap , typename _Cp , typename _Rp , __detail::_RegexExecutorPolicy , bool >
bool std::basic_regex< _Ch_type, _Rx_traits >::__detail::__regex_algo_impl (_Bp, _Bp, match_results< _Bp, _Ap > &, const basic_regex< _Cp, _Rp > &, regex_constants::match_flag_type)
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ()
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (const _Ch_type *__p, flag_type __f=ECMAScript)
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (const _Ch_type *__p, std::size_t __len, flag_type __f=ECMAScript)
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (const basic_regex &__rhs)=default
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (basic_regex &&__rhs) noexcept=default
 
template<typename _Ch_traits , typename _Ch_alloc >
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (const std::basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=ECMAScript)
 
template<typename _FwdIter >
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (_FwdIter __first, _FwdIter __last, flag_type __f=ECMAScript)
 
 std::basic_regex< _Ch_type, _Rx_traits >::basic_regex (initializer_list< _Ch_type > __l, flag_type __f=ECMAScript)
 
 std::basic_regex< _Ch_type, _Rx_traits >::~basic_regex ()
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::operator= (const basic_regex &__rhs)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::operator= (basic_regex &&__rhs) noexcept
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::operator= (const _Ch_type *__p)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::operator= (initializer_list< _Ch_type > __l)
 
template<typename _Ch_traits , typename _Alloc >
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::operator= (const basic_string< _Ch_type, _Ch_traits, _Alloc > &__s)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (const basic_regex &__rhs)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (basic_regex &&__rhs) noexcept
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (const _Ch_type *__p, flag_type __flags=ECMAScript)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (const _Ch_type *__p, size_t __len, flag_type __flags=ECMAScript)
 
template<typename _Ch_traits , typename _Alloc >
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (const basic_string< _Ch_type, _Ch_traits, _Alloc > &__s, flag_type __flags=ECMAScript)
 
template<typename _InputIterator >
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (_InputIterator __first, _InputIterator __last, flag_type __flags=ECMAScript)
 
basic_regexstd::basic_regex< _Ch_type, _Rx_traits >::assign (initializer_list< _Ch_type > __l, flag_type __flags=ECMAScript)
 
unsigned int std::basic_regex< _Ch_type, _Rx_traits >::mark_count () const
 
flag_type std::basic_regex< _Ch_type, _Rx_traits >::flags () const
 
locale_type std::basic_regex< _Ch_type, _Rx_traits >::imbue (locale_type __loc)
 
locale_type std::basic_regex< _Ch_type, _Rx_traits >::getloc () const
 
void std::basic_regex< _Ch_type, _Rx_traits >::swap (basic_regex &__rhs)
 

28.10 Public Types

typedef sub_match< _Bi_iter > std::match_results< _Bi_iter, _Alloc >::value_type
 
typedef const value_typestd::match_results< _Bi_iter, _Alloc >::const_reference
 
typedef value_typestd::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
 
typedef match_results< const char * > cmatch
 
typedef match_results< string::const_iterator > smatch
 
typedef match_results< const wchar_t * > wcmatch
 
typedef match_results< wstring::const_iterator > wsmatch
 
template<typename _BiIter >
bool operator== (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _BiIter >
bool operator!= (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _BiIter >
bool operator< (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _BiIter >
bool operator<= (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _BiIter >
bool operator>= (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _BiIter >
bool operator> (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator== (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator< (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator> (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator>= (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator<= (const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator== (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator< (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator> (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator>= (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator<= (const sub_match< _Bi_iter > &__lhs, const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &__rhs)
 
template<typename _Bi_iter >
bool operator== (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator!= (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator< (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator> (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator>= (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator<= (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator== (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator!= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator< (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator> (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator>= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator<= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
 
template<typename _Bi_iter >
bool operator== (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator!= (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator< (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator> (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator>= (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator<= (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
 
template<typename _Bi_iter >
bool operator== (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Bi_iter >
bool operator!= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Bi_iter >
bool operator< (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Bi_iter >
bool operator> (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Bi_iter >
bool operator>= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Bi_iter >
bool operator<= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
 
template<typename _Ch_type , typename _Ch_traits , typename _Bi_iter >
basic_ostream< _Ch_type, _Ch_traits > & operator<< (basic_ostream< _Ch_type, _Ch_traits > &__os, const sub_match< _Bi_iter > &__m)
 
template<typename _Bi_iter , typename _Alloc >
bool operator== (const match_results< _Bi_iter, _Alloc > &__m1, const match_results< _Bi_iter, _Alloc > &__m2)
 
template<typename _Bi_iter , class _Alloc >
bool operator!= (const match_results< _Bi_iter, _Alloc > &__m1, const match_results< _Bi_iter, _Alloc > &__m2)
 
template<typename _Bi_iter , typename _Alloc >
void swap (match_results< _Bi_iter, _Alloc > &__lhs, match_results< _Bi_iter, _Alloc > &__rhs) noexcept
 

Matching, Searching, and Replacing

typedef regex_iterator< const char * > cregex_iterator
 
typedef regex_iterator< string::const_iterator > sregex_iterator
 
typedef regex_iterator< const wchar_t * > wcregex_iterator
 
typedef regex_iterator< wstring::const_iterator > wsregex_iterator
 
typedef regex_token_iterator< const char * > cregex_token_iterator
 
typedef regex_token_iterator< string::const_iterator > sregex_token_iterator
 
typedef regex_token_iterator< const wchar_t * > wcregex_token_iterator
 
typedef regex_token_iterator< wstring::const_iterator > wsregex_token_iterator
 
template<typename _Bi_iter , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match (_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool regex_match (_Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Ch_type , typename _Alloc , typename _Rx_traits >
bool regex_match (const _Ch_type *__s, match_results< const _Ch_type *, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __f=regex_constants::match_default)
 
template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match (const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match (const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &&, match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &, const basic_regex< _Ch_type, _Rx_traits > &, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
template<typename _Ch_type , class _Rx_traits >
bool regex_match (const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __f=regex_constants::match_default)
 
template<typename _Ch_traits , typename _Str_allocator , typename _Ch_type , typename _Rx_traits >
bool regex_match (const basic_string< _Ch_type, _Ch_traits, _Str_allocator > &__s, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Bi_iter , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search (_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool regex_search (_Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Ch_type , class _Alloc , class _Rx_traits >
bool regex_search (const _Ch_type *__s, match_results< const _Ch_type *, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__e, regex_constants::match_flag_type __f=regex_constants::match_default)
 
template<typename _Ch_type , typename _Rx_traits >
bool regex_search (const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits > &__e, regex_constants::match_flag_type __f=regex_constants::match_default)
 
template<typename _Ch_traits , typename _String_allocator , typename _Ch_type , typename _Rx_traits >
bool regex_search (const basic_string< _Ch_type, _Ch_traits, _String_allocator > &__s, const basic_regex< _Ch_type, _Rx_traits > &__e, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search (const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__e, regex_constants::match_flag_type __f=regex_constants::match_default)
 
template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search (const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &&, match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &, const basic_regex< _Ch_type, _Rx_traits > &, regex_constants::match_flag_type=regex_constants::match_default)=delete
 
template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
_Out_iter regex_replace (_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type >
_Out_iter 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)
 
template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa , typename _Fst , typename _Fsa >
basic_string< _Ch_type, _St, _Sa > regex_replace (const basic_string< _Ch_type, _St, _Sa > &__s, const basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string< _Ch_type, _Fst, _Fsa > &__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type, _St, _Sa > regex_replace (const basic_string< _Ch_type, _St, _Sa > &__s, const basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type *__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type > regex_replace (const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
template<typename _Rx_traits , typename _Ch_type >
basic_string< _Ch_type > regex_replace (const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type *__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
 

28.10.7 Swap

template<typename , typename , typename >
class std::match_results< _Bi_iter, _Alloc >::regex_iterator
 
void std::match_results< _Bi_iter, _Alloc >::swap (match_results &__that) noexcept
 
int std::sub_match< _BiIter >::compare (const string_type &__s) const
 
int std::sub_match< _BiIter >::compare (const value_type *__s) const
 

28.10.1 Construction, Copying, and Destruction

 std::match_results< _Bi_iter, _Alloc >::match_results ()
 
 std::match_results< _Bi_iter, _Alloc >::match_results (const _Alloc &__a) noexcept
 
 std::match_results< _Bi_iter, _Alloc >::match_results (const match_results &)=default
 
 std::match_results< _Bi_iter, _Alloc >::match_results (match_results &&) noexcept=default
 
match_resultsstd::match_results< _Bi_iter, _Alloc >::operator= (const match_results &)=default
 
match_resultsstd::match_results< _Bi_iter, _Alloc >::operator= (match_results &&)=default
 
 std::match_results< _Bi_iter, _Alloc >::~match_results ()=default
 
bool std::match_results< _Bi_iter, _Alloc >::ready () const noexcept
 

28.10.2 Size

size_type std::match_results< _Bi_iter, _Alloc >::size () const noexcept
 
size_type std::match_results< _Bi_iter, _Alloc >::max_size () const noexcept
 
bool std::match_results< _Bi_iter, _Alloc >::empty () const noexcept
 

28.10.4 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 noexcept
 
const_iterator std::match_results< _Bi_iter, _Alloc >::cbegin () const noexcept
 
const_iterator std::match_results< _Bi_iter, _Alloc >::end () const noexcept
 
const_iterator std::match_results< _Bi_iter, _Alloc >::cend () const noexcept
 

28.10.5 Formatting

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 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
 
template<typename _Out_iter , typename _St , typename _Sa >
_Out_iter std::match_results< _Bi_iter, _Alloc >::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 > std::match_results< _Bi_iter, _Alloc >::format (const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const
 
string_type std::match_results< _Bi_iter, _Alloc >::format (const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const
 

28.10.6 Allocator

allocator_type std::match_results< _Bi_iter, _Alloc >::get_allocator () const noexcept
 

Detailed Description

A facility for performing regular expression pattern matching.

Typedef Documentation

◆ cmatch

template<typename _BiIter >
typedef match_results<const char*> cmatch
related

Tests the equivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 2087 of file regex.h.

◆ cregex_iterator

template<typename _BiIter >
typedef regex_iterator<const char*> cregex_iterator
related

Token iterator for C-style NULL-terminated strings.

Definition at line 2726 of file regex.h.

◆ cregex_token_iterator

template<typename _BiIter >
typedef regex_token_iterator<const char*> cregex_token_iterator
related

Token iterator for C-style NULL-terminated strings.

Definition at line 2965 of file regex.h.

◆ csub_match

typedef sub_match<const char*> std::csub_match

Standard regex submatch over a C-style null-terminated string.

Definition at line 1012 of file regex.h.

◆ regex

typedef basic_regex<char> std::regex

Standard regular expressions.

Definition at line 833 of file regex.h.

◆ smatch

template<typename _BiIter >
typedef match_results<string::const_iterator> smatch
related

Tests the equivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 2088 of file regex.h.

◆ sregex_iterator

template<typename _BiIter >
typedef regex_iterator<string::const_iterator> sregex_iterator
related

Token iterator for C-style NULL-terminated strings.

Definition at line 2727 of file regex.h.

◆ sregex_token_iterator

template<typename _BiIter >
typedef regex_token_iterator<string::const_iterator> sregex_token_iterator
related

Token iterator for standard strings.

Definition at line 2968 of file regex.h.

◆ ssub_match

typedef sub_match<string::const_iterator> std::ssub_match

Standard regex submatch over a standard string.

Definition at line 1015 of file regex.h.

◆ wcmatch

template<typename _BiIter >
typedef match_results<const wchar_t*> wcmatch
related

Tests the equivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 2090 of file regex.h.

◆ wcregex_iterator

template<typename _BiIter >
typedef regex_iterator<const wchar_t*> wcregex_iterator
related

Token iterator for C-style NULL-terminated strings.

Definition at line 2729 of file regex.h.

◆ wcregex_token_iterator

template<typename _BiIter >
typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator
related

Token iterator for C-style NULL-terminated wide strings.

Definition at line 2972 of file regex.h.

◆ wcsub_match

typedef sub_match<const wchar_t*> std::wcsub_match

Regex submatch over a C-style null-terminated wide string.

Definition at line 1019 of file regex.h.

◆ wregex

typedef basic_regex<wchar_t> std::wregex

Standard wide-character regular expressions.

Definition at line 837 of file regex.h.

◆ wsmatch

template<typename _BiIter >
typedef match_results<wstring::const_iterator> wsmatch
related

Tests the equivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 2091 of file regex.h.

◆ wsregex_iterator

template<typename _BiIter >
typedef regex_iterator<wstring::const_iterator> wsregex_iterator
related

Token iterator for C-style NULL-terminated strings.

Definition at line 2730 of file regex.h.

◆ wsregex_token_iterator

template<typename _BiIter >
typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator
related

Token iterator for standard wide-character strings.

Definition at line 2975 of file regex.h.

◆ wssub_match

typedef sub_match<wstring::const_iterator> std::wssub_match

Regex submatch over a standard wide string.

Definition at line 1022 of file regex.h.

Enumeration Type Documentation

◆ __match_flag

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.

◆ __syntax_option

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.

◆ error_type

The expression contained an invalid collating element name.

Definition at line 49 of file regex_error.h.

◆ match_flag_type

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.

◆ syntax_option_type

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.

Function Documentation

◆ basic_regex() [1/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( )
inline

Constructs a basic regular expression that does not match any character sequence.

Definition at line 424 of file regex.h.

Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ basic_regex() [2/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _FwdIter >
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( _FwdIter  __first,
_FwdIter  __last,
flag_type  __f = ECMAScript 
)
inline

Constructs a basic regular expression from the range [first, last) interpreted according to the flags in f.

Parameters
__firstThe start of a range containing a valid regular expression.
__lastThe end of a range containing a valid regular expression.
__fThe format flags of the regular expression.
Exceptions
regex_errorif [__first, __last) is not a valid regular expression.

Definition at line 506 of file regex.h.

◆ basic_regex() [3/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( basic_regex< _Ch_type, _Rx_traits > &&  __rhs)
defaultnoexcept

Move-constructs a basic regular expression.

Parameters
__rhsA regex object.

◆ basic_regex() [4/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( const _Ch_type *  __p,
flag_type  __f = ECMAScript 
)
inlineexplicit

Constructs a basic regular expression from the sequence [__p, __p + char_traits<_Ch_type>::length(__p)) interpreted according to the flags in __f.

Parameters
__pA pointer to the start of a C-style null-terminated string containing a regular expression.
__fFlags indicating the syntax rules and options.
Exceptions
regex_errorif __p is not a valid regular expression.

Definition at line 440 of file regex.h.

◆ basic_regex() [5/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( const _Ch_type *  __p,
std::size_t  __len,
flag_type  __f = ECMAScript 
)
inline

Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the flags in f.

Parameters
__pA pointer to the start of a string containing a regular expression.
__lenThe length of the string containing the regular expression.
__fFlags indicating the syntax rules and options.
Exceptions
regex_errorif __p is not a valid regular expression.

Definition at line 456 of file regex.h.

◆ basic_regex() [6/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( const basic_regex< _Ch_type, _Rx_traits > &  __rhs)
default

Copy-constructs a basic regular expression.

Parameters
__rhsA regex object.

◆ basic_regex() [7/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _Ch_traits , typename _Ch_alloc >
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( const std::basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &  __s,
flag_type  __f = ECMAScript 
)
inlineexplicit

Constructs a basic regular expression from the string s interpreted according to the flags in f.

Parameters
__sA string containing a regular expression.
__fFlags indicating the syntax rules and options.
Exceptions
regex_errorif __s is not a valid regular expression.

Definition at line 486 of file regex.h.

◆ basic_regex() [8/8]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::basic_regex ( initializer_list< _Ch_type >  __l,
flag_type  __f = ECMAScript 
)
inline

Constructs a basic regular expression from an initializer list.

Parameters
__lThe initializer list.
__fThe format flags of the regular expression.
Exceptions
regex_errorif __l is not a valid regular expression.

Definition at line 519 of file regex.h.

◆ match_results() [1/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
std::match_results< _Bi_iter, _Alloc >::match_results ( )
inline

Constructs a default match_results container.

Postcondition
size() returns 0 and str() returns an empty string.

Definition at line 1730 of file regex.h.

◆ match_results() [2/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
std::match_results< _Bi_iter, _Alloc >::match_results ( const _Alloc &  __a)
inlineexplicitnoexcept

Constructs a default match_results container.

Postcondition
size() returns 0 and str() returns an empty string.

Definition at line 1737 of file regex.h.

◆ match_results() [3/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
std::match_results< _Bi_iter, _Alloc >::match_results ( const match_results< _Bi_iter, _Alloc > &  )
default

Copy constructs a match_results.

◆ match_results() [4/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
std::match_results< _Bi_iter, _Alloc >::match_results ( match_results< _Bi_iter, _Alloc > &&  )
defaultnoexcept

Move constructs a match_results.

◆ regex_error()

std::regex_error::regex_error ( regex_constants::error_type  __ecode)
explicit

Constructs a regex_error object.

Parameters
__ecodethe regex error code.

◆ regex_iterator() [1/3]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator ( )
default

Provides a singular iterator, useful for indicating one-past-the-end of a range.

Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator().

◆ regex_iterator() [2/3]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator ( _Bi_iter  __a,
_Bi_iter  __b,
const regex_type __re,
regex_constants::match_flag_type  __m = regex_constants::match_default 
)
inline

Constructs a regex_iterator...

Parameters
__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 2650 of file regex.h.

References std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator().

◆ regex_iterator() [3/3]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator ( const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  )
default

Copy constructs a regex_iterator.

◆ regex_token_iterator() [1/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( )
inline

Default constructs a regex_token_iterator.

A default-constructed regex_token_iterator is a singular iterator that will compare equal to the one-past-the-end value for any iterator of the same type.

Definition at line 2762 of file regex.h.

◆ regex_token_iterator() [2/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
template<std::size_t _Nm>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( _Bi_iter  __a,
_Bi_iter  __b,
const regex_type __re,
const int(&)  __submatches[_Nm],
regex_constants::match_flag_type  __m = regex_constants::match_default 
)
inline

Constructs a regex_token_iterator...

Parameters
__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.

Definition at line 2835 of file regex.h.

◆ regex_token_iterator() [3/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( _Bi_iter  __a,
_Bi_iter  __b,
const regex_type __re,
const std::vector< int > &  __submatches,
regex_constants::match_flag_type  __m = regex_constants::match_default 
)
inline

Constructs a regex_token_iterator...

Parameters
__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.

Definition at line 2800 of file regex.h.

◆ regex_token_iterator() [4/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( _Bi_iter  __a,
_Bi_iter  __b,
const regex_type __re,
initializer_list< int >  __submatches,
regex_constants::match_flag_type  __m = regex_constants::match_default 
)
inline

Constructs a regex_token_iterator...

Parameters
__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.

Definition at line 2817 of file regex.h.

◆ regex_token_iterator() [5/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( _Bi_iter  __a,
_Bi_iter  __b,
const regex_type __re,
int  __submatch = 0,
regex_constants::match_flag_type  __m = regex_constants::match_default 
)
inline

Constructs a regex_token_iterator...

Parameters
__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:
  • -1 each enumerated subexpression does NOT match the regular expression (aka field splitting)
  • 0 the entire string matching the subexpression is returned for each match within the text.
  • >0 enumerates only the indicated subexpression from a match within the text.
__m[IN] Policy flags for match rules.

Definition at line 2784 of file regex.h.

◆ regex_token_iterator() [6/6]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_token_iterator ( const regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  __rhs)
inline

Copy constructs a regex_token_iterator.

Parameters
__rhs[IN] A regex_token_iterator to copy.

Definition at line 2867 of file regex.h.

◆ regex_traits()

template<typename _Ch_type >
std::regex_traits< _Ch_type >::regex_traits ( )
inline

Constructs a default traits object.

Definition at line 160 of file regex.h.

◆ ~basic_regex()

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::~basic_regex ( )
inline

Destroys a basic regular expression.

Definition at line 526 of file regex.h.

◆ ~match_results()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
std::match_results< _Bi_iter, _Alloc >::~match_results ( )
default

Destroys a match_results object.

◆ assign() [1/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _InputIterator >
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( _InputIterator  __first,
_InputIterator  __last,
flag_type  __flags = ECMAScript 
)
inline

Assigns a new regular expression to a regex object.

Parameters
__firstThe start of a range containing a valid regular expression.
__lastThe end of a range containing a valid regular expression.
__flagsSyntax option flags.
Exceptions
regex_errorif 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 675 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ assign() [2/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( basic_regex< _Ch_type, _Rx_traits > &&  __rhs)
inlinenoexcept

The move-assignment operator.

Parameters
__rhsAnother regular expression object.

Definition at line 597 of file regex.h.

References std::move(), and std::basic_regex< _Ch_type, _Rx_traits >::swap().

◆ assign() [3/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( const _Ch_type *  __p,
flag_type  __flags = ECMAScript 
)
inline

Assigns a new regular expression to a regex object from a C-style null-terminated string containing a regular expression pattern.

Parameters
__pA pointer to a C-style null-terminated string containing a regular expression pattern.
__flagsSyntax option flags.
Exceptions
regex_errorif __p does not contain a valid regular expression pattern interpreted according to __flags. If regex_error is thrown, *this remains unchanged.

Definition at line 618 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ assign() [4/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( const _Ch_type *  __p,
size_t  __len,
flag_type  __flags = ECMAScript 
)
inline

Assigns a new regular expression to a regex object from a C-style string containing a regular expression pattern.

Parameters
__pA pointer to a C-style string containing a regular expression pattern.
__lenThe length of the regular expression pattern string.
__flagsSyntax option flags.
Exceptions
regex_errorif p does not contain a valid regular expression pattern interpreted according to __flags. If regex_error is thrown, *this remains unchanged.

Definition at line 637 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ assign() [5/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( const basic_regex< _Ch_type, _Rx_traits > &  __rhs)
inline

the real assignment operator.

Parameters
__rhsAnother regular expression object.

Definition at line 584 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::swap().

Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::operator=().

◆ assign() [6/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _Ch_traits , typename _Alloc >
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( const basic_string< _Ch_type, _Ch_traits, _Alloc > &  __s,
flag_type  __flags = ECMAScript 
)
inline

Assigns a new regular expression to a regex object from a string containing a regular expression pattern.

Parameters
__sA string containing a regular expression pattern.
__flagsSyntax option flags.
Exceptions
regex_errorif __s does not contain a valid regular expression pattern interpreted according to __flags. If regex_error is thrown, *this remains unchanged.

Definition at line 653 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::basic_regex(), std::basic_regex< _Ch_type, _Rx_traits >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size().

◆ assign() [7/7]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::assign ( initializer_list< _Ch_type >  __l,
flag_type  __flags = ECMAScript 
)
inline

Assigns a new regular expression to a regex object.

Parameters
__lAn initializer list representing a regular expression.
__flagsSyntax option flags.
Exceptions
regex_errorif __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 691 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ begin()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_iterator std::match_results< _Bi_iter, _Alloc >::begin ( ) const
inlinenoexcept

Gets an iterator to the start of the sub_match collection.

Definition at line 1910 of file regex.h.

References std::vector< _Tp, _Alloc >::begin().

Referenced by std::match_results< _Bi_iter, _Alloc >::cbegin(), and std::sub_match< _BiIter >::operator==().

◆ cbegin()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_iterator std::match_results< _Bi_iter, _Alloc >::cbegin ( ) const
inlinenoexcept

Gets an iterator to the start of the sub_match collection.

Definition at line 1917 of file regex.h.

References std::match_results< _Bi_iter, _Alloc >::begin().

◆ cend()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_iterator std::match_results< _Bi_iter, _Alloc >::cend ( ) const
inlinenoexcept

Gets an iterator to one-past-the-end of the collection.

Definition at line 1931 of file regex.h.

References std::match_results< _Bi_iter, _Alloc >::end().

◆ code()

regex_constants::error_type std::regex_error::code ( ) const
inline

Gets the regex error code.

Returns
the regex error code.

Definition at line 153 of file regex_error.h.

◆ compare() [1/3]

template<typename _BiIter >
int std::sub_match< _BiIter >::compare ( const string_type __s) const
inline

Compares this sub_match to a string.

Parameters
__sA string to compare to this sub_match.
Return values
<0this matched sequence will collate before __s.
=0this matched sequence is equivalent to __s.
<0this matched sequence will collate after __s.

Definition at line 938 of file regex.h.

◆ compare() [2/3]

template<typename _BiIter >
int std::sub_match< _BiIter >::compare ( const sub_match< _BiIter > &  __s) const
inline

Compares this and another matched sequence.

Parameters
__sAnother matched sequence to compare to this one.
Return values
<0this matched sequence will collate before __s.
=0this matched sequence is equivalent to __s.
<0this matched sequence will collate after __s.

Definition at line 924 of file regex.h.

Referenced by std::sub_match< _BiIter >::operator!=(), std::sub_match< _BiIter >::operator<(), std::sub_match< _BiIter >::operator<=(), std::sub_match< _BiIter >::operator==(), std::sub_match< _BiIter >::operator>(), and std::sub_match< _BiIter >::operator>=().

◆ compare() [3/3]

template<typename _BiIter >
int std::sub_match< _BiIter >::compare ( const value_type *  __s) const
inline

Compares this sub_match to a string.

Parameters
__sA string to compare to this sub_match.
Return values
<0this matched sequence will collate before __s.
=0this matched sequence is equivalent to __s.
<0this matched sequence will collate after __s.

Definition at line 942 of file regex.h.

◆ empty()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
bool std::match_results< _Bi_iter, _Alloc >::empty ( ) const
inlinenoexcept

Indicates if the match_results contains no results.

Return values
trueThe match_results object is empty.
falseThe match_results object is not empty.

Definition at line 1806 of file regex.h.

References std::match_results< _Bi_iter, _Alloc >::size().

Referenced by std::match_results< _Bi_iter, _Alloc >::end(), and std::sub_match< _BiIter >::operator==().

◆ end()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_iterator std::match_results< _Bi_iter, _Alloc >::end ( ) const
inlinenoexcept

Gets an iterator to one-past-the-end of the collection.

Definition at line 1924 of file regex.h.

References std::match_results< _Bi_iter, _Alloc >::empty(), and std::vector< _Tp, _Alloc >::end().

Referenced by std::match_results< _Bi_iter, _Alloc >::cend(), and std::sub_match< _BiIter >::operator==().

◆ error_backref()

constexpr error_type std::regex_constants::error_backref ( _S_error_backref  )
constexpr

The expression contained an invalid back reference.

◆ error_badbrace()

constexpr error_type std::regex_constants::error_badbrace ( _S_error_badbrace  )
constexpr

The expression contained an invalid range in a {} expression.

◆ error_badrepeat()

constexpr error_type std::regex_constants::error_badrepeat ( _S_error_badrepeat  )
constexpr

One of *?+{ was not preceded by a valid regular expression.

◆ error_brace()

constexpr error_type std::regex_constants::error_brace ( _S_error_brace  )
constexpr

The expression contained mismatched { and }

◆ error_brack()

constexpr error_type std::regex_constants::error_brack ( _S_error_brack  )
constexpr

The expression contained mismatched [ and ].

◆ error_collate()

constexpr error_type std::regex_constants::error_collate ( _S_error_collate  )
constexpr

The expression contained an invalid collating element name.

◆ error_complexity()

constexpr error_type std::regex_constants::error_complexity ( _S_error_complexity  )
constexpr

The complexity of an attempted match against a regular expression exceeded a pre-set level.

◆ error_ctype()

constexpr error_type std::regex_constants::error_ctype ( _S_error_ctype  )
constexpr

The expression contained an invalid character class name.

◆ error_escape()

constexpr error_type std::regex_constants::error_escape ( _S_error_escape  )
constexpr

The expression contained an invalid escaped character, or a trailing escape.

◆ error_paren()

constexpr error_type std::regex_constants::error_paren ( _S_error_paren  )
constexpr

The expression contained mismatched ( and ).

◆ error_range()

constexpr error_type std::regex_constants::error_range ( _S_error_range  )
constexpr

The expression contained an invalid character range, such as [b-a] in most encodings.

◆ error_space()

constexpr error_type std::regex_constants::error_space ( _S_error_space  )
constexpr

There was insufficient memory to convert the expression into a finite state machine.

◆ error_stack()

constexpr error_type std::regex_constants::error_stack ( _S_error_stack  )
constexpr

There was insufficient memory to determine whether the regular expression could match the specified character sequence.

◆ flags()

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
flag_type std::basic_regex< _Ch_type, _Rx_traits >::flags ( ) const
inline

Gets the flags used to construct the regular expression or in the last call to assign().

Definition at line 712 of file regex.h.

◆ format() [1/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
template<typename _Out_iter , typename _St , typename _Sa >
_Out_iter std::match_results< _Bi_iter, _Alloc >::format ( _Out_iter  __out,
const basic_string< char_type, _St, _Sa > &  __fmt,
match_flag_type  __flags = regex_constants::format_default 
) const
inline

◆ format() [2/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
template<typename _Out_iter >
_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
Precondition
ready() == true

Referenced by std::match_results< _Bi_iter, _Alloc >::format().

◆ format() [3/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
template<typename _St , typename _Sa >
basic_string<char_type, _St, _Sa> std::match_results< _Bi_iter, _Alloc >::format ( const basic_string< char_type, _St, _Sa > &  __fmt,
match_flag_type  __flags = regex_constants::format_default 
) const
inline
Precondition
ready() == true

Definition at line 1972 of file regex.h.

References std::back_inserter(), and std::match_results< _Bi_iter, _Alloc >::format().

◆ format() [4/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
string_type std::match_results< _Bi_iter, _Alloc >::format ( const char_type *  __fmt,
match_flag_type  __flags = regex_constants::format_default 
) const
inline
Precondition
ready() == true

Definition at line 1984 of file regex.h.

References std::back_inserter(), and std::match_results< _Bi_iter, _Alloc >::format().

◆ get_allocator()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
allocator_type std::match_results< _Bi_iter, _Alloc >::get_allocator ( ) const
inlinenoexcept

Gets a copy of the allocator.

Definition at line 2006 of file regex.h.

References std::vector< _Tp, _Alloc >::get_allocator().

◆ getloc() [1/2]

template<typename _Ch_type >
locale_type std::regex_traits< _Ch_type >::getloc ( ) const
inline

Gets a copy of the current locale in use by the regex_traits object.

Definition at line 373 of file regex.h.

◆ getloc() [2/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
locale_type std::basic_regex< _Ch_type, _Rx_traits >::getloc ( ) const
inline

Gets the locale currently imbued in the regular expression object.

Definition at line 734 of file regex.h.

◆ imbue() [1/2]

template<typename _Ch_type >
locale_type std::regex_traits< _Ch_type >::imbue ( locale_type  __loc)
inline

Imbues the regex_traits object with a copy of a new locale.

Parameters
__locA locale.
Returns
a copy of the previous locale in use by the regex_traits object.
Note
Calling imbue with a different locale than the one currently in use invalidates all cached data held by *this.

Definition at line 362 of file regex.h.

References std::swap().

◆ imbue() [2/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
locale_type std::basic_regex< _Ch_type, _Rx_traits >::imbue ( locale_type  __loc)
inline

Imbues the regular expression object with the given locale.

Parameters
__locA locale.

Definition at line 722 of file regex.h.

References std::swap().

◆ isctype()

template<typename _Ch_type >
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.

Parameters
__ca character.
__fa class type (as returned from lookup_classname).
Returns
true if the character __c is a member of the classification represented by __f, false otherwise.
Exceptions
std::bad_castif the current locale does not have a ctype facet.

◆ length() [1/3]

template<typename _BiIter >
difference_type std::sub_match< _BiIter >::length ( ) const
inlinenoexcept

Gets the length of the matching sequence.

Definition at line 885 of file regex.h.

References std::pair< _BiIter, _BiIter >::first, and std::pair< _BiIter, _BiIter >::second.

◆ length() [2/3]

template<typename _Ch_type >
static std::size_t std::regex_traits< _Ch_type >::length ( const char_type *  __p)
inlinestatic

Gives the length of a C-style string starting at __p.

Parameters
__pa pointer to the start of a character sequence.
Returns
the number of characters between *__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.

Definition at line 173 of file regex.h.

◆ length() [3/3]

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
__subindicates 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 1825 of file regex.h.

◆ lookup_classname()

template<typename _Ch_type >
template<typename _Fwd_iter >
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.

Parameters
__firstbeginning of the character sequence.
__lastone-past-the-end of the character sequence.
__icaseignores the case of the classification name.
Returns
an unspecified value that represents the character classification named by the character sequence designated by the iterator range [__first, __last). If 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.

  • d
  • w
  • s
  • alnum
  • alpha
  • blank
  • cntrl
  • digit
  • graph
  • lower
  • print
  • punct
  • space
  • upper
  • xdigit

◆ lookup_collatename()

template<typename _Ch_type >
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::lookup_collatename ( _Fwd_iter  __first,
_Fwd_iter  __last 
) const

Gets a collation element by name.

Parameters
__firstbeginning of the collation element name.
__lastone-past-the-end of the collation element name.
Returns
a sequence of one or more characters that represents the collating element consisting of the character sequence designated by the iterator range [__first, __last). Returns an empty string if the character sequence is not a valid collating element.

◆ mark_count()

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
unsigned int std::basic_regex< _Ch_type, _Rx_traits >::mark_count ( ) const
inline

Gets the number of marked subexpressions within the regular expression.

Definition at line 700 of file regex.h.

◆ max_size()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
size_type std::match_results< _Bi_iter, _Alloc >::max_size ( ) const
inlinenoexcept

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 1797 of file regex.h.

References std::vector< _Tp, _Alloc >::max_size().

◆ operator string_type()

template<typename _BiIter >
std::sub_match< _BiIter >::operator string_type ( ) const
inline

Gets the matching sequence as a string.

Returns
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 898 of file regex.h.

References std::sub_match< _BiIter >::str().

◆ operator!=() [1/10]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the inequivalence of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1146 of file regex.h.

◆ operator!=() [2/10]

template<typename _Bi_iter , class _Alloc >
bool operator!= ( const match_results< _Bi_iter, _Alloc > &  __m1,
const match_results< _Bi_iter, _Alloc > &  __m2 
)
related

Compares two match_results for inequality.

Returns
true if the two objects do not refer to the same match, false otherwise.

Definition at line 2128 of file regex.h.

◆ operator!=() [3/10]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator!= ( const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  __rhs) const
inlinenoexcept

Tests the inequivalence of two regex iterators.

Definition at line 2684 of file regex.h.

◆ operator!=() [4/10]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
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

Compares a regex_token_iterator to another for inequality.

Definition at line 2889 of file regex.h.

◆ operator!=() [5/10]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the inequivalence of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1239 of file regex.h.

◆ operator!=() [6/10]

template<typename _Bi_iter >
bool operator!= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the inequivalence of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1581 of file regex.h.

◆ operator!=() [7/10]

template<typename _Bi_iter >
bool operator!= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the inequivalence of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1407 of file regex.h.

◆ operator!=() [8/10]

template<typename _BiIter >
bool operator!= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the inequivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1066 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator!=() [9/10]

template<typename _Bi_iter >
bool operator!= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the inequivalence of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1481 of file regex.h.

◆ operator!=() [10/10]

template<typename _Bi_iter >
bool operator!= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the inequivalence of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs is not equivalent to __rhs, false otherwise.

Definition at line 1313 of file regex.h.

◆ operator&() [1/2]

constexpr match_flag_type std::regex_constants::operator& ( match_flag_type  __a,
match_flag_type  __b 
)
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 374 of file regex_constants.h.

◆ operator&() [2/2]

constexpr syntax_option_type std::regex_constants::operator& ( syntax_option_type  __a,
syntax_option_type  __b 
)
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.

◆ operator&=() [1/2]

match_flag_type& std::regex_constants::operator&= ( match_flag_type __a,
match_flag_type  __b 
)
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 399 of file regex_constants.h.

◆ operator&=() [2/2]

syntax_option_type& std::regex_constants::operator&= ( syntax_option_type __a,
syntax_option_type  __b 
)
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.

◆ operator*() [1/2]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
const value_type& std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* ( ) const
inline

Dereferences a regex_token_iterator.

Definition at line 2896 of file regex.h.

◆ operator*() [2/2]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
const value_type& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* ( ) const
inlinenoexcept

Dereferences a regex_iterator.

Definition at line 2691 of file regex.h.

◆ operator++() [1/4]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_iterator& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ( )

Increments a regex_iterator.

◆ operator++() [2/4]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_token_iterator& std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ( )

Increments a regex_token_iterator.

◆ operator++() [3/4]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_iterator std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ( int  )
inline

Postincrements a regex_iterator.

Definition at line 2711 of file regex.h.

◆ operator++() [4/4]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_token_iterator std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ ( int  )
inline

Postincrements a regex_token_iterator.

Definition at line 2916 of file regex.h.

◆ operator->() [1/2]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
const value_type* std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> ( ) const
inline

Selects a regex_token_iterator member.

Definition at line 2903 of file regex.h.

◆ operator->() [2/2]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
const value_type* std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> ( ) const
inlinenoexcept

Selects a regex_iterator member.

Definition at line 2698 of file regex.h.

◆ operator<() [1/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator< ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1157 of file regex.h.

◆ operator<() [2/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator< ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1250 of file regex.h.

◆ operator<() [3/7]

template<typename _Bi_iter >
bool operator< ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1593 of file regex.h.

References std::__addressof().

◆ operator<() [4/7]

template<typename _Bi_iter >
bool operator< ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the ordering of a regular expression submatch and a C string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1418 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator<() [5/7]

template<typename _BiIter >
bool operator< ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the ordering of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1076 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator<() [6/7]

template<typename _Bi_iter >
bool operator< ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1493 of file regex.h.

References std::__addressof().

◆ operator<() [7/7]

template<typename _Bi_iter >
bool operator< ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs precedes __rhs, false otherwise.

Definition at line 1324 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator<<()

template<typename _Ch_type , typename _Ch_traits , typename _Bi_iter >
basic_ostream< _Ch_type, _Ch_traits > & operator<< ( basic_ostream< _Ch_type, _Ch_traits > &  __os,
const sub_match< _Bi_iter > &  __m 
)
related

Inserts a matched string into an output stream.

Parameters
__osThe output stream.
__mA submatch string.
Returns
the output stream with the submatch string inserted.

Definition at line 1632 of file regex.h.

◆ operator<=() [1/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator<= ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1193 of file regex.h.

◆ operator<=() [2/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator<= ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1286 of file regex.h.

◆ operator<=() [3/7]

template<typename _Bi_iter >
bool operator<= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1632 of file regex.h.

◆ operator<=() [4/7]

template<typename _Bi_iter >
bool operator<= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the ordering of a regular expression submatch and a C string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1454 of file regex.h.

◆ operator<=() [5/7]

template<typename _BiIter >
bool operator<= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the ordering of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1087 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator<=() [6/7]

template<typename _Bi_iter >
bool operator<= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1532 of file regex.h.

◆ operator<=() [7/7]

template<typename _Bi_iter >
bool operator<= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs does not succeed __rhs, false otherwise.

Definition at line 1360 of file regex.h.

◆ operator=() [1/9]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::operator= ( basic_regex< _Ch_type, _Rx_traits > &&  __rhs)
inlinenoexcept

Move-assigns one regular expression to another.

Definition at line 540 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::move().

◆ operator=() [2/9]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::operator= ( const _Ch_type *  __p)
inline

Replaces a regular expression with a new one constructed from a C-style null-terminated string.

Parameters
__pA pointer to the start of a null-terminated C-style string containing a regular expression.

Definition at line 551 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ operator=() [3/9]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::operator= ( const basic_regex< _Ch_type, _Rx_traits > &  __rhs)
inline

Assigns one regular expression to another.

Definition at line 533 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ operator=() [4/9]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _Ch_traits , typename _Alloc >
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::operator= ( const basic_string< _Ch_type, _Ch_traits, _Alloc > &  __s)
inline

Replaces a regular expression with a new one constructed from a string.

Parameters
__sA pointer to a string containing a regular expression.

Definition at line 574 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ operator=() [5/9]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
match_results& std::match_results< _Bi_iter, _Alloc >::operator= ( const match_results< _Bi_iter, _Alloc > &  )
default

Assigns rhs to *this.

◆ operator=() [6/9]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_iterator& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= ( const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  )
default

Copy assigns one regex_iterator to another.

◆ operator=() [7/9]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
regex_token_iterator& std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= ( const regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  __rhs)

Assigns a regex_token_iterator to another.

Parameters
__rhs[IN] A regex_token_iterator to copy.

◆ operator=() [8/9]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
basic_regex& std::basic_regex< _Ch_type, _Rx_traits >::operator= ( initializer_list< _Ch_type >  __l)
inline

Replaces a regular expression with a new one constructed from an initializer list.

Parameters
__lThe initializer list.
Exceptions
regex_errorif __l is not a valid regular expression.

Definition at line 563 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::assign().

◆ operator=() [9/9]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
match_results& std::match_results< _Bi_iter, _Alloc >::operator= ( match_results< _Bi_iter, _Alloc > &&  )
default

Move-assigns rhs to *this.

◆ operator==() [1/10]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator== ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the equivalence of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1133 of file regex.h.

◆ operator==() [2/10]

template<typename _Bi_iter , typename _Alloc >
bool operator== ( const match_results< _Bi_iter, _Alloc > &  __m1,
const match_results< _Bi_iter, _Alloc > &  __m2 
)
related

◆ operator==() [3/10]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== ( const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  ) const
noexcept

Tests the equivalence of two regex iterators.

◆ operator==() [4/10]

template<typename _Bi_iter , typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
bool std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== ( const regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits > &  __rhs) const

Compares a regex_token_iterator to another for equality.

◆ operator==() [5/10]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator== ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the equivalence of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1208 of file regex.h.

◆ operator==() [6/10]

template<typename _Bi_iter >
bool operator== ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the equivalence of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1547 of file regex.h.

References std::__addressof().

◆ operator==() [7/10]

template<typename _Bi_iter >
bool operator== ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the equivalence of a regular expression submatch and a C string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1375 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator==() [8/10]

template<typename _BiIter >
bool operator== ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the equivalence of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1037 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator==() [9/10]

template<typename _Bi_iter >
bool operator== ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the equivalence of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1468 of file regex.h.

References std::__addressof().

◆ operator==() [10/10]

template<typename _Bi_iter >
bool operator== ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the equivalence of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs is equivalent to __rhs, false otherwise.

Definition at line 1300 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator>() [1/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator> ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1170 of file regex.h.

◆ operator>() [2/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator> ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1263 of file regex.h.

◆ operator>() [3/7]

template<typename _Bi_iter >
bool operator> ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1607 of file regex.h.

◆ operator>() [4/7]

template<typename _Bi_iter >
bool operator> ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the ordering of a regular expression submatch and a C string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1431 of file regex.h.

◆ operator>() [5/7]

template<typename _BiIter >
bool operator> ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the ordering of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1110 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator>() [6/7]

template<typename _Bi_iter >
bool operator> ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1507 of file regex.h.

◆ operator>() [7/7]

template<typename _Bi_iter >
bool operator> ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs succeeds __rhs, false otherwise.

Definition at line 1337 of file regex.h.

◆ operator>=() [1/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator>= ( const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a string and a regular expression submatch.

Parameters
__lhsA string.
__rhsA regular expression submatch.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1182 of file regex.h.

◆ operator>=() [2/7]

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator>= ( const sub_match< _Bi_iter > &  __lhs,
const __sub_match_string< _Bi_iter, _Ch_traits, _Ch_alloc > &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a string.

Parameters
__lhsA regular expression submatch.
__rhsA string.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1275 of file regex.h.

◆ operator>=() [3/7]

template<typename _Bi_iter >
bool operator>= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
)
related

Tests the ordering of a regular expression submatch and a character.

Parameters
__lhsA regular expression submatch.
__rhsA character.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1620 of file regex.h.

◆ operator>=() [4/7]

template<typename _Bi_iter >
bool operator>= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
)
related

Tests the ordering of a regular expression submatch and a C string.

Parameters
__lhsA regular expression submatch.
__rhsA null-terminated string.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1443 of file regex.h.

◆ operator>=() [5/7]

template<typename _BiIter >
bool operator>= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
)
related

Tests the ordering of two regular expression submatches.

Parameters
__lhsFirst regular expression submatch.
__rhsSecond regular expression submatch.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1099 of file regex.h.

References std::sub_match< _BiIter >::compare().

◆ operator>=() [6/7]

template<typename _Bi_iter >
bool operator>= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a character and a regular expression submatch.

Parameters
__lhsA character.
__rhsA regular expression submatch.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1520 of file regex.h.

◆ operator>=() [7/7]

template<typename _Bi_iter >
bool operator>= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
)
related

Tests the ordering of a C string and a regular expression submatch.

Parameters
__lhsA null-terminated string.
__rhsA regular expression submatch.
Returns
true if __lhs does not precede __rhs, false otherwise.

Definition at line 1349 of file regex.h.

◆ operator[]()

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
__subindicates 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 1868 of file regex.h.

◆ operator^() [1/2]

constexpr match_flag_type std::regex_constants::operator^ ( match_flag_type  __a,
match_flag_type  __b 
)
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 388 of file regex_constants.h.

◆ operator^() [2/2]

constexpr syntax_option_type std::regex_constants::operator^ ( syntax_option_type  __a,
syntax_option_type  __b 
)
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.

◆ operator^=() [1/2]

match_flag_type& std::regex_constants::operator^= ( match_flag_type __a,
match_flag_type  __b 
)
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 407 of file regex_constants.h.

◆ operator^=() [2/2]

syntax_option_type& std::regex_constants::operator^= ( syntax_option_type __a,
syntax_option_type  __b 
)
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.

◆ operator|() [1/2]

constexpr match_flag_type std::regex_constants::operator| ( match_flag_type  __a,
match_flag_type  __b 
)
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 381 of file regex_constants.h.

◆ operator|() [2/2]

constexpr syntax_option_type std::regex_constants::operator| ( syntax_option_type  __a,
syntax_option_type  __b 
)
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.

◆ operator|=() [1/2]

match_flag_type& std::regex_constants::operator|= ( match_flag_type __a,
match_flag_type  __b 
)
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 403 of file regex_constants.h.

◆ operator|=() [2/2]

syntax_option_type& std::regex_constants::operator|= ( syntax_option_type __a,
syntax_option_type  __b 
)
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.

◆ operator~() [1/2]

constexpr match_flag_type std::regex_constants::operator~ ( match_flag_type  __a)
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 395 of file regex_constants.h.

◆ operator~() [2/2]

constexpr syntax_option_type std::regex_constants::operator~ ( syntax_option_type  __a)
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.

◆ position()

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
__subindicates 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 1840 of file regex.h.

◆ prefix()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_reference std::match_results< _Bi_iter, _Alloc >::prefix ( ) const
inline

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 1885 of file regex.h.

Referenced by std::sub_match< _BiIter >::operator==().

◆ ready()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
bool std::match_results< _Bi_iter, _Alloc >::ready ( ) const
inlinenoexcept

Indicates if the match_results is ready.

Return values
trueThe object has a fully-established result state.
falseThe object is not ready.

Definition at line 1776 of file regex.h.

References std::vector< _Tp, _Alloc >::empty().

Referenced by std::sub_match< _BiIter >::operator==().

◆ regex_match() [1/7]

template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool regex_match ( _Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Indicates if there is a match between the regular expression e and all of the character sequence [first, last).

Parameters
__firstBeginning of the character sequence to match.
__lastOne-past-the-end of the character sequence to match.
__reThe regular expression.
__flagsControls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2201 of file regex.h.

◆ regex_match() [2/7]

template<typename _Bi_iter , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match ( _Bi_iter  __s,
_Bi_iter  __e,
match_results< _Bi_iter, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Determines if there is a match between the regular expression e and all of the character sequence [first, last).

Parameters
__sStart of the character sequence to match.
__eOne-past-the-end of the character sequence to match.
__mThe match results.
__reThe regular expression.
__flagsControls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2173 of file regex.h.

◆ regex_match() [3/7]

template<typename _Ch_type , class _Rx_traits >
bool regex_match ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __f = regex_constants::match_default 
)
related

Indicates if there is a match between the regular expression e and a C-style null-terminated string.

Parameters
__sThe C-style null-terminated string to match.
__reThe regular expression.
__fControls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2286 of file regex.h.

◆ regex_match() [4/7]

template<typename _Ch_type , typename _Alloc , typename _Rx_traits >
bool regex_match ( const _Ch_type *  __s,
match_results< const _Ch_type *, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __f = regex_constants::match_default 
)
related

Determines if there is a match between the regular expression e and a C-style null-terminated string.

Parameters
__sThe C-style null-terminated string to match.
__mThe match results.
__reThe regular expression.
__fControls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2226 of file regex.h.

◆ regex_match() [5/7]

template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &&  ,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &  ,
const basic_regex< _Ch_type, _Rx_traits > &  ,
regex_constants::match_flag_type  = regex_constants::match_default 
)
related

Prevent unsafe attempts to get match_results from a temporary string.

◆ regex_match() [6/7]

template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_match ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &  __s,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Determines if there is a match between the regular expression e and a string.

Parameters
__sThe string to match.
__mThe match results.
__reThe regular expression.
__flagsControls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2250 of file regex.h.

References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().

◆ regex_match() [7/7]

template<typename _Ch_traits , typename _Str_allocator , typename _Ch_type , typename _Rx_traits >
bool regex_match ( const basic_string< _Ch_type, _Ch_traits, _Str_allocator > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Indicates if there is a match between the regular expression e and a string.

Parameters
__s[IN] The string to match.
__re[IN] The regular expression.
__flags[IN] Controls how the regular expression is matched.
Return values
trueA match exists.
falseOtherwise.
Exceptions
anexception of type regex_error.

Definition at line 2308 of file regex.h.

References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().

◆ regex_replace() [1/6]

template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type >
_Out_iter 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 
)
related

Search for a regular expression within a range for multiple times, and replace the matched parts through filling a format C-string.

Parameters
__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.
Returns
__out
Exceptions
anexception of type regex_error.

◆ regex_replace() [2/6]

template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
_Out_iter regex_replace ( _Out_iter  __out,
_Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const basic_string< _Ch_type, _St, _Sa > &  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Search for a regular expression within a range for multiple times, and replace the matched parts through filling a format string.

Parameters
__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.
Returns
__out
Exceptions
anexception of type regex_error.

Definition at line 2479 of file regex.h.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

◆ regex_replace() [3/6]

template<typename _Rx_traits , typename _Ch_type >
basic_string< _Ch_type > regex_replace ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const _Ch_type *  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Search for a regular expression within a C-string for multiple times, and replace the matched parts through filling a format C-string.

Parameters
__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.
Returns
The string after replacing.
Exceptions
anexception of type regex_error.

Definition at line 2602 of file regex.h.

References std::back_inserter().

◆ regex_replace() [4/6]

template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type > regex_replace ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const basic_string< _Ch_type, _St, _Sa > &  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Search for a regular expression within a C-string for multiple times, and replace the matched parts through filling a format string.

Parameters
__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.
Returns
The string after replacing.
Exceptions
anexception of type regex_error.

Definition at line 2576 of file regex.h.

References std::back_inserter().

◆ regex_replace() [5/6]

template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type, _St, _Sa > regex_replace ( const basic_string< _Ch_type, _St, _Sa > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const _Ch_type *  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Search for a regular expression within a string for multiple times, and replace the matched parts through filling a format C-string.

Parameters
__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.
Returns
The string after replacing.
Exceptions
anexception of type regex_error.

Definition at line 2550 of file regex.h.

References std::back_inserter(), std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().

◆ regex_replace() [6/6]

template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa , typename _Fst , typename _Fsa >
basic_string< _Ch_type, _St, _Sa > regex_replace ( const basic_string< _Ch_type, _St, _Sa > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const basic_string< _Ch_type, _Fst, _Fsa > &  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Search for a regular expression within a string for multiple times, and replace the matched parts through filling a format string.

Parameters
__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.
Returns
The string after replacing.
Exceptions
anexception of type regex_error.

Definition at line 2524 of file regex.h.

References std::back_inserter(), std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().

◆ regex_search() [1/7]

template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool regex_search ( _Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Searches for a regular expression within a range.

Parameters
__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.
Return values
trueA match was found within the string.
falseNo match was found within the string.
Exceptions
anexception of type regex_error.

Definition at line 2355 of file regex.h.

◆ regex_search() [2/7]

template<typename _Bi_iter , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search ( _Bi_iter  __s,
_Bi_iter  __e,
match_results< _Bi_iter, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Searches for a regular expression within a range.

Parameters
__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.
Return values
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Exceptions
anexception of type regex_error.

Definition at line 2331 of file regex.h.

◆ regex_search() [3/7]

template<typename _Ch_type , typename _Rx_traits >
bool regex_search ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
)
related

Searches for a regular expression within a C-string.

Parameters
__s[IN] The C-string to search.
__e[IN] The regular expression to search for.
__f[IN] Search policy flags.
Return values
trueA match was found within the string.
falseNo match was found within the string.
Exceptions
anexception of type regex_error.

Definition at line 2397 of file regex.h.

◆ regex_search() [4/7]

template<typename _Ch_type , class _Alloc , class _Rx_traits >
bool regex_search ( const _Ch_type *  __s,
match_results< const _Ch_type *, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
)
related

Searches for a regular expression within a C-string.

Parameters
__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.
Return values
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Exceptions
anexception of type regex_error.

Definition at line 2378 of file regex.h.

◆ regex_search() [5/7]

template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &&  ,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &  ,
const basic_regex< _Ch_type, _Rx_traits > &  ,
regex_constants::match_flag_type  = regex_constants::match_default 
)
related

Prevent unsafe attempts to get match_results from a temporary string.

◆ regex_search() [6/7]

template<typename _Ch_traits , typename _Ch_alloc , typename _Alloc , typename _Ch_type , typename _Rx_traits >
bool regex_search ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &  __s,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Alloc > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
)
related

Searches for a regular expression within a string.

Parameters
__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.
Return values
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Exceptions
anexception of type regex_error.

Definition at line 2439 of file regex.h.

References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().

◆ regex_search() [7/7]

template<typename _Ch_traits , typename _String_allocator , typename _Ch_type , typename _Rx_traits >
bool regex_search ( const basic_string< _Ch_type, _Ch_traits, _String_allocator > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)
related

Searches for a regular expression within a string.

Parameters
__s[IN] The string to search.
__e[IN] The regular expression to search for.
__flags[IN] Search policy flags.
Return values
trueA match was found within the string.
falseNo match was found within the string.
Exceptions
anexception of type regex_error.

Definition at line 2416 of file regex.h.

◆ size()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
size_type std::match_results< _Bi_iter, _Alloc >::size ( ) const
inlinenoexcept

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 1793 of file regex.h.

References std::vector< _Tp, _Alloc >::empty(), and std::vector< _Tp, _Alloc >::size().

Referenced by std::match_results< _Bi_iter, _Alloc >::empty(), and std::sub_match< _BiIter >::operator==().

◆ str() [1/2]

template<typename _BiIter >
string_type std::sub_match< _BiIter >::str ( ) const
inline

Gets the matching sequence as a string.

Returns
the matching sequence as a string.

Definition at line 907 of file regex.h.

References std::pair< _BiIter, _BiIter >::first, and std::pair< _BiIter, _BiIter >::second.

Referenced by std::sub_match< _BiIter >::operator string_type().

◆ str() [2/2]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
string_type std::match_results< _Bi_iter, _Alloc >::str ( size_type  __sub = 0) const
inline

Gets the match or submatch converted to a string type.

Parameters
__subindicates 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 1853 of file regex.h.

◆ suffix()

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
const_reference std::match_results< _Bi_iter, _Alloc >::suffix ( ) const
inline

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 1900 of file regex.h.

Referenced by std::sub_match< _BiIter >::operator==().

◆ swap() [1/4]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
void std::basic_regex< _Ch_type, _Rx_traits >::swap ( basic_regex< _Ch_type, _Rx_traits > &  __rhs)
inline

Swaps the contents of two regular expression objects.

Parameters
__rhsAnother regular expression object.

Definition at line 744 of file regex.h.

References std::swap().

Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::swap().

◆ swap() [2/4]

template<typename _Ch_type , typename _Rx_traits >
void swap ( basic_regex< _Ch_type, _Rx_traits > &  __lhs,
basic_regex< _Ch_type, _Rx_traits > &  __rhs 
)
related

Swaps the contents of two regular expression objects.

Parameters
__lhsFirst regular expression.
__rhsSecond regular expression.

Definition at line 850 of file regex.h.

References std::basic_regex< _Ch_type, _Rx_traits >::swap().

◆ swap() [3/4]

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
void std::match_results< _Bi_iter, _Alloc >::swap ( match_results< _Bi_iter, _Alloc > &  __that)
inlinenoexcept

Swaps the contents of two match_results.

Definition at line 2020 of file regex.h.

References std::swap(), and std::vector< _Tp, _Alloc >::swap().

◆ swap() [4/4]

template<typename _Bi_iter , typename _Alloc >
void swap ( match_results< _Bi_iter, _Alloc > &  __lhs,
match_results< _Bi_iter, _Alloc > &  __rhs 
)
related

Swaps two match results.

Parameters
__lhsA match result.
__rhsA match result.

The contents of the two match_results objects are swapped.

Definition at line 2143 of file regex.h.

◆ transform()

template<typename _Ch_type >
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::transform ( _Fwd_iter  __first,
_Fwd_iter  __last 
) const
inline

Gets a sort key for a character sequence.

Parameters
__firstbeginning of the character sequence.
__lastone-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.

Returns
a locale-specific sort key equivalent to the input range.
Exceptions
std::bad_castif the current locale does not have a collate facet.

Definition at line 226 of file regex.h.

References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size().

Referenced by std::regex_traits< _Ch_type >::transform_primary().

◆ transform_primary()

template<typename _Ch_type >
template<typename _Fwd_iter >
string_type std::regex_traits< _Ch_type >::transform_primary ( _Fwd_iter  __first,
_Fwd_iter  __last 
) const
inline

Gets a sort key for a character sequence, independent of case.

Parameters
__firstbeginning of the character sequence.
__lastone-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.

Todo:
Implement this function correctly.

Definition at line 250 of file regex.h.

References std::vector< _Tp, _Alloc >::data(), std::vector< _Tp, _Alloc >::size(), and std::regex_traits< _Ch_type >::transform().

◆ translate()

template<typename _Ch_type >
char_type std::regex_traits< _Ch_type >::translate ( char_type  __c) const
inline

Performs the identity translation.

Parameters
__cA character to the locale-specific character set.
Returns
__c.

Definition at line 184 of file regex.h.

◆ translate_nocase()

template<typename _Ch_type >
char_type std::regex_traits< _Ch_type >::translate_nocase ( char_type  __c) const
inline

Translates a character into a case-insensitive equivalent.

Parameters
__cA character to the locale-specific character set.
Returns
the locale-specific lower-case equivalent of __c.
Exceptions
std::bad_castif the imbued locale does not support the ctype facet.

Definition at line 197 of file regex.h.

◆ value()

template<typename _Ch_type >
int std::regex_traits< _Ch_type >::value ( _Ch_type  __ch,
int  __radix 
) const

Converts a digit to an int.

Parameters
__cha character representing a digit.
__radixthe radix if the numeric conversion (limited to 8, 10, or 16).
Returns
the value represented by the digit __ch in base radix if the character __ch is a valid digit in base radix; otherwise returns -1.

Variable Documentation

◆ __polynomial

constexpr syntax_option_type std::regex_constants::__polynomial
inlineconstexpr

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.

◆ awk [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::awk
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 414 of file regex.h.

◆ awk [2/2]

constexpr syntax_option_type std::regex_constants::awk
inlineconstexpr

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.

◆ basic [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::basic
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 412 of file regex.h.

◆ basic [2/2]

constexpr syntax_option_type std::regex_constants::basic
inlineconstexpr

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.

◆ collate [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::collate
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 410 of file regex.h.

◆ collate [2/2]

constexpr syntax_option_type std::regex_constants::collate
inlineconstexpr

Specifies that character ranges of the form [a-b] should be locale sensitive.

Definition at line 111 of file regex_constants.h.

◆ ECMAScript [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::ECMAScript
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 411 of file regex.h.

◆ ECMAScript [2/2]

constexpr syntax_option_type std::regex_constants::ECMAScript
inlineconstexpr

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.

◆ egrep [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::egrep
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 416 of file regex.h.

◆ egrep [2/2]

constexpr syntax_option_type std::regex_constants::egrep
inlineconstexpr

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.

◆ extended [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::extended
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 413 of file regex.h.

◆ extended [2/2]

constexpr syntax_option_type std::regex_constants::extended
inlineconstexpr

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.

◆ format_default

constexpr match_flag_type std::regex_constants::format_default
inlineconstexpr

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]):

  • $$ The dollar-sign itself ($)
  • $& The matched substring.
  • $` The portion of string that precedes the matched substring. This would be match_results::prefix().
  • $' The portion of string that follows the matched substring. This would be match_results::suffix().
  • $n The nth capture, where n is in [1,9] and $n is not followed by a decimal digit. If n <= match_results::size() and the nth capture is undefined, use the empty string instead. If n > match_results::size(), the result is implementation-defined.
  • $nn The nnth capture, where nn is a two-digit decimal number on [01, 99]. If nn <= match_results::size() and the nth capture is undefined, use the empty string instead. If nn > match_results::size(), the result is implementation-defined.

Definition at line 346 of file regex_constants.h.

◆ format_first_only

constexpr match_flag_type std::regex_constants::format_first_only
inlineconstexpr

When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced.

Definition at line 370 of file regex_constants.h.

◆ format_no_copy

constexpr match_flag_type std::regex_constants::format_no_copy
inlineconstexpr

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 363 of file regex_constants.h.

◆ format_sed

constexpr match_flag_type std::regex_constants::format_sed
inlineconstexpr

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 355 of file regex_constants.h.

◆ grep [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::grep
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 415 of file regex.h.

◆ grep [2/2]

constexpr syntax_option_type std::regex_constants::grep
inlineconstexpr

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.

◆ icase [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::icase
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 407 of file regex.h.

◆ icase [2/2]

constexpr syntax_option_type std::regex_constants::icase
inlineconstexpr

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.

◆ match_any

constexpr match_flag_type std::regex_constants::match_any
inlineconstexpr

If more than one match is possible then any match is an acceptable result.

Definition at line 297 of file regex_constants.h.

◆ match_continuous

constexpr match_flag_type std::regex_constants::match_continuous
inlineconstexpr

The expression only matches a sub-sequence that begins at first .

Definition at line 309 of file regex_constants.h.

◆ match_default

constexpr match_flag_type std::regex_constants::match_default
inlineconstexpr

The default matching rules.

Definition at line 260 of file regex_constants.h.

◆ match_not_bol

constexpr match_flag_type std::regex_constants::match_not_bol
inlineconstexpr

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 268 of file regex_constants.h.

◆ match_not_bow

constexpr match_flag_type std::regex_constants::match_not_bow
inlineconstexpr

The expression \b is not matched against the sub-sequence [first,first).

Definition at line 283 of file regex_constants.h.

◆ match_not_eol

constexpr match_flag_type std::regex_constants::match_not_eol
inlineconstexpr

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 276 of file regex_constants.h.

◆ match_not_eow

constexpr match_flag_type std::regex_constants::match_not_eow
inlineconstexpr

The expression \b should not be matched against the sub-sequence [last,last).

Definition at line 290 of file regex_constants.h.

◆ match_not_null

constexpr match_flag_type std::regex_constants::match_not_null
inlineconstexpr

The expression does not match an empty sequence.

Definition at line 303 of file regex_constants.h.

◆ match_prev_avail

constexpr match_flag_type std::regex_constants::match_prev_avail
inlineconstexpr

–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 317 of file regex_constants.h.

◆ nosubs [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::nosubs
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 408 of file regex.h.

◆ nosubs [2/2]

constexpr syntax_option_type std::regex_constants::nosubs
inlineconstexpr

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.

◆ optimize [1/2]

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
constexpr flag_type std::basic_regex< _Ch_type, _Rx_traits >::optimize
staticconstexpr

Constructs a basic regular expression that does not match any character sequence.

Definition at line 409 of file regex.h.

◆ optimize [2/2]

constexpr syntax_option_type std::regex_constants::optimize
inlineconstexpr

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.

Friends

◆ __detail::__regex_algo_impl

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename _Bp , typename _Ap , typename _Cp , typename _Rp , __detail::_RegexExecutorPolicy , bool >
bool __detail::__regex_algo_impl ( _Bp  ,
_Bp  ,
match_results< _Bp, _Ap > &  ,
const basic_regex< _Cp, _Rp > &  ,
regex_constants::match_flag_type   
)
friend

Constructs a basic regular expression that does not match any character sequence.

◆ __detail::_Executor

template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
template<typename , typename , typename , bool >
friend class __detail::_Executor
friend

Constructs a basic regular expression that does not match any character sequence.

Definition at line 776 of file regex.h.

◆ regex_iterator

template<typename _Bi_iter , typename _Alloc = allocator<sub_match<_Bi_iter> >>
template<typename , typename , typename >
friend class regex_iterator
friend

Swaps the contents of two match_results.

Definition at line 2030 of file regex.h.