STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
regex File Reference
#include <algorithm>
#include <iterator>
#include <locale>
#include <string>
#include <stdexcept>
#include <utility>
#include <vector>
#include <ctype.h>
#include <wchar.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>

Classes

class  regex_traits< _Elem >
 
struct  _Cl_names< _Elem >
 
struct  _Cmp_cs< _RxTraits >
 
struct  _Cmp_icase< _RxTraits >
 
struct  _Cmp_collate< _RxTraits >
 
struct  _Regex_traits_base
 
class  _Regex_traits< _Elem >
 
class  regex_traits< char >
 
class  regex_traits< wchar_t >
 
class  regex_error
 
class  sub_match< _BidIt >
 
class  match_results< _BidIt, _Alloc >
 
class  match_results< _BidIt, _Alloc >
 
struct  _Buf< _Elem >
 
struct  _Bitmap
 
struct  _Sequence< _Elem >
 
class  _Node_base
 
class  _Root_node
 
class  _Node_end_group
 
class  _Node_assert
 
class  _Node_capture
 
class  _Node_back
 
class  _Node_str< _Elem >
 
class  _Node_class< _Elem, _RxTraits >
 
class  _Node_endif
 
class  _Node_if
 
class  _Node_end_rep
 
struct  _Loop_vals_t
 
class  _Node_rep
 
class  _Builder< _FwdIt, _Elem, _RxTraits >
 
class  _Bt_state_t< _BidIt >
 
class  _Tgt_state_t< _BidIt >
 
struct  _Tgt_state_t< _BidIt >::_Grp_t
 
class  _Matcher< _BidIt, _Elem, _RxTraits, _It >
 
class  _Parser< _FwdIt, _Elem, _RxTraits >
 
class  _Regex_base
 
class  basic_regex< _Elem, _RxTraits >
 
class  regex_iterator< _BidIt, _Elem, _RxTraits >
 
class  regex_token_iterator< _BidIt, _Elem, _RxTraits >
 

Namespaces

 regex_constants
 
 tr1
 
 tr1::regex_constants
 

Macros

#define _REGEX_
 
#define _REGEX_MAX_COMPLEXITY_COUNT   10000000L /* set to 0 to disable */
 
#define _REGEX_MAX_STACK_COUNT   1000L /* set to 0 to disable */
 
#define _ENHANCED_REGEX_VISUALIZER   0
 
#define _REGEX_DIFFT(iter)   typename iterator_traits<iter>::difference_type
 
#define _REGEX_VALT(iter)   typename iterator_traits<iter>::value_type
 
#define _REGEX_BITMASK_OPS(Ty)
 
#define _REGEX_CHAR_CLASS_NAME(n, c)   { n, sizeof (n)/sizeof (n[0]) - 1, c }
 
#define _Isdigit(x)   ('0' <= (x) && (x) <= '9')
 

Typedefs

typedef sub_match< const char * > csub_match
 
typedef sub_match< const wchar_t * > wcsub_match
 
typedef sub_match< string::const_iteratorssub_match
 
typedef sub_match< wstring::const_iteratorwssub_match
 
typedef basic_regex< char > regex
 
typedef basic_regex< wchar_twregex
 
typedef match_results< const char * > cmatch
 
typedef match_results< const wchar_t * > wcmatch
 
typedef match_results< string::const_iteratorsmatch
 
typedef match_results< wstring::const_iteratorwsmatch
 
typedef regex_iterator< const char * > cregex_iterator
 
typedef regex_iterator< const wchar_t * > wcregex_iterator
 
typedef regex_iterator< string::const_iteratorsregex_iterator
 
typedef regex_iterator< wstring::const_iteratorwsregex_iterator
 
typedef regex_token_iterator< const char * > cregex_token_iterator
 
typedef regex_token_iterator< const wchar_t * > wcregex_token_iterator
 
typedef regex_token_iterator< string::const_iteratorsregex_token_iterator
 
typedef regex_token_iterator< wstring::const_iteratorwsregex_token_iterator
 

Enumerations

enum  _Meta_type {
  _Meta_lpar = '(', _Meta_rpar = ')', _Meta_dlr = '$', _Meta_caret = '^',
  _Meta_dot = '.', _Meta_star = '*', _Meta_plus = '+', _Meta_query = '?',
  _Meta_lsq = '[', _Meta_rsq = ']', _Meta_bar = '|', _Meta_esc = '\\',
  _Meta_dash = '-', _Meta_lbr = '{', _Meta_rbr = '}', _Meta_comma = ',',
  _Meta_colon = ':', _Meta_equal = '=', _Meta_exc = '!', _Meta_eos = -1,
  _Meta_nl = '\n', _Meta_cr = '\r', _Meta_bsp = '\b', _Meta_chr = 0,
  _Esc_bsl = '\\', _Esc_word = 'b', _Esc_not_word = 'B', _Esc_ctrl_a = 'a',
  _Esc_ctrl_b = 'b', _Esc_ctrl_f = 'f', _Esc_ctrl_n = 'n', _Esc_ctrl_r = 'r',
  _Esc_ctrl_t = 't', _Esc_ctrl_v = 'v', _Esc_ctrl = 'c', _Esc_hex = 'x',
  _Esc_uni = 'u'
}
 
enum  regex_constants::syntax_option_type {
  regex_constants::ECMAScript = 0x01, regex_constants::basic = 0x02, regex_constants::extended = 0x04, regex_constants::awk = 0x08,
  regex_constants::grep = 0x10, regex_constants::egrep = 0x20, regex_constants::_Gmask = 0x3F, regex_constants::icase = 0x0100,
  regex_constants::nosubs = 0x0200, regex_constants::optimize = 0x0400, regex_constants::collate = 0x0800
}
 
enum  regex_constants::match_flag_type {
  regex_constants::match_default = 0x0000, regex_constants::match_not_bol = 0x0001, regex_constants::match_not_eol = 0x0002, regex_constants::match_not_bow = 0x0004,
  regex_constants::match_not_eow = 0x0008, regex_constants::match_any = 0x0010, regex_constants::match_not_null = 0x0020, regex_constants::match_continuous = 0x0040,
  regex_constants::_Match_partial = 0x0080, regex_constants::match_prev_avail = 0x0100, regex_constants::format_default = 0x0000, regex_constants::format_sed = 0x0400,
  regex_constants::format_no_copy = 0x0800, regex_constants::format_first_only = 0x1000, regex_constants::_Match_not_null = 0x2000
}
 
enum  regex_constants::error_type {
  regex_constants::error_collate, regex_constants::error_ctype, regex_constants::error_escape, regex_constants::error_backref,
  regex_constants::error_brack, regex_constants::error_paren, regex_constants::error_brace, regex_constants::error_badbrace,
  regex_constants::error_range, regex_constants::error_space, regex_constants::error_badrepeat, regex_constants::error_complexity,
  regex_constants::error_stack, regex_constants::error_parse, regex_constants::error_syntax
}
 
enum  _Node_flags {
  _Fl_none = 0x00, _Fl_negate = 0x01, _Fl_greedy = 0x02, _Fl_final = 0x04,
  _Fl_longest = 0x08
}
 
enum  _Node_type {
  _N_none, _N_nop, _N_bol, _N_eol,
  _N_wbound, _N_dot, _N_str, _N_class,
  _N_group, _N_end_group, _N_assert, _N_neg_assert,
  _N_end_assert, _N_capture, _N_end_capture, _N_back,
  _N_if, _N_endif, _N_rep, _N_end_rep,
  _N_begin, _N_end
}
 
enum  _Prs_ret { _Prs_none, _Prs_chr, _Prs_set }
 
enum  _Lang_flags {
  _L_ext_rep = 0x00000001, _L_alt_pipe = 0x00000002, _L_alt_nl = 0x00000004, _L_nex_grp = 0x00000008,
  _L_nex_rep = 0x00000010, _L_nc_grp = 0x00000020, _L_asrt_gen = 0x00000040, _L_asrt_wrd = 0x00000080,
  _L_bckr = 0x00000100, _L_lim_bckr = 0x00000200, _L_ngr_rep = 0x00000400, _L_esc_uni = 0x00000800,
  _L_esc_hex = 0x00001000, _L_esc_oct = 0x00002000, _L_esc_bsl = 0x00004000, _L_esc_ffnx = 0x00008000,
  _L_esc_ffn = 0x00010000, _L_esc_wsd = 0x00020000, _L_esc_ctrl = 0x00040000, _L_no_nl = 0x00080000,
  _L_bzr_chr = 0x00100000, _L_grp_esc = 0x00200000, _L_ident_ECMA = 0x00400000, _L_ident_ERE = 0x00800000,
  _L_ident_awk = 0x01000000, _L_anch_rstr = 0x02000000, _L_star_beg = 0x04000000, _L_empty_grp = 0x08000000,
  _L_paren_bal = 0x10000000, _L_brk_rstr = 0x20000000, _L_mtch_long = 0x40000000, _L_no_subs = 0x80000000
}
 

Functions

_CRTIMP2_PURE _NO_RETURN (__CLRCALL_PURE_OR_CDECL _Xregex_error(regex_constants::error_type _Code))
 
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Same (_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _Pr _Pred)
 
template<class _BidIt >
bool operator== (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator!= (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator< (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator> (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator<= (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator>= (const sub_match< _BidIt > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator== (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator!= (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator< (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator> (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator<= (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator>= (const _REGEX_VALT(_BidIt)*_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator== (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator!= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator< (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator> (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator<= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator>= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)*_Right)
 
template<class _BidIt >
bool operator== (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator!= (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator< (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator> (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator<= (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator>= (const _REGEX_VALT(_BidIt)&_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt >
bool operator== (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt >
bool operator!= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt >
bool operator< (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt >
bool operator> (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt >
bool operator<= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt >
bool operator>= (const sub_match< _BidIt > &_Left, const _REGEX_VALT(_BidIt)&_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator== (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator!= (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator< (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator> (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator<= (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator>= (const sub_match< _BidIt > &_Left, const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator== (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator!= (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator< (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator> (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator<= (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _BidIt , class _Traits , class _Alloc >
bool operator>= (const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &_Left, const sub_match< _BidIt > &_Right)
 
template<class _Elem , class _Traits , class _BidIt >
basic_ostream< _Elem, _Traits > & operator<< (basic_ostream< _Elem, _Traits > &_Ostr, const sub_match< _BidIt > &_Match)
 
template<class _BidIt , class _Alloc , class _InIt , class _OutIt >
_OutIt _Format_default (const match_results< _BidIt, _Alloc > &_Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type _Flags=regex_constants::format_default)
 
template<class _BidIt , class _Alloc , class _InIt , class _OutIt >
_OutIt _Format_sed (const match_results< _BidIt, _Alloc > &_Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type _Flags=regex_constants::format_default)
 
template<class _BidIt , class _Alloc >
bool operator== (const match_results< _BidIt, _Alloc > &_Left, const match_results< _BidIt, _Alloc > &_Right)
 
template<class _BidIt , class _Alloc >
bool operator!= (const match_results< _BidIt, _Alloc > &_Left, const match_results< _BidIt, _Alloc > &_Right)
 
_Node_flags operator| (_Node_flags _Left, _Node_flags _Right)
 
_Node_flags operator|= (_Node_flags &_Left, _Node_flags _Right)
 
_Node_flags operator^= (_Node_flags &_Left, _Node_flags _Right)
 
void _Destroy_node (_Node_base *_Nx, _Node_base *_Ne=0)
 
template<class _Elem , class _RxTraits >
void swap (basic_regex< _Elem, _RxTraits > &_Left, basic_regex< _Elem, _RxTraits > &_Right) _THROW0()
 
template<class _BidIt , class _Alloc >
void swap (match_results< _BidIt, _Alloc > &_Left, match_results< _BidIt, _Alloc > &_Right) _THROW0()
 
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits , class _It >
bool _Regex_match (_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
 
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits >
bool regex_match (_BidIt _First, _BidIt _Last, match_results< _BidIt, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _BidIt , class _Elem , class _RxTraits >
bool regex_match (_BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _Elem , class _RxTraits >
bool regex_match (_In_z_ const _Elem *_Str, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _Elem , class _Alloc , class _RxTraits >
bool regex_match (_In_z_ const _Elem *_Str, match_results< const _Elem *, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _StTraits , class _StAlloc , class _Alloc , class _Elem , class _RxTraits >
bool regex_match (const basic_string< _Elem, _StTraits, _StAlloc > &_Str, match_results< typename basic_string< _Elem, _StTraits, _StAlloc >::const_iterator, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _StTraits , class _StAlloc , class _Elem , class _RxTraits >
bool regex_match (const basic_string< _Elem, _StTraits, _StAlloc > &_Str, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits , class _It >
bool _Regex_search (_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
 
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits >
bool regex_search (_BidIt _First, _BidIt _Last, match_results< _BidIt, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _BidIt , class _Elem , class _RxTraits >
bool regex_search (_BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _Elem , class _RxTraits >
bool regex_search (_In_z_ const _Elem *_Str, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _Elem , class _Alloc , class _RxTraits >
bool regex_search (_In_z_ const _Elem *_Str, match_results< const _Elem *, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _StTraits , class _StAlloc , class _Alloc , class _Elem , class _RxTraits >
bool regex_search (const basic_string< _Elem, _StTraits, _StAlloc > &_Str, match_results< typename basic_string< _Elem, _StTraits, _StAlloc >::const_iterator, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _StTraits , class _StAlloc , class _Elem , class _RxTraits >
bool regex_search (const basic_string< _Elem, _StTraits, _StAlloc > &_Str, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem , class _Traits , class _Alloc >
_OutIt _Regex_replace (_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs)
 
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem , class _Traits , class _Alloc >
_OutIt regex_replace (_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem >
_OutIt regex_replace (_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const _Elem *_Ptr, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _RxTraits , class _Elem , class _Traits1 , class _Alloc1 , class _Traits2 , class _Alloc2 >
basic_string< _Elem, _Traits1, _Alloc1 > regex_replace (const basic_string< _Elem, _Traits1, _Alloc1 > &_Str, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits2, _Alloc2 > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _RxTraits , class _Elem , class _Traits1 , class _Alloc1 >
basic_string< _Elem, _Traits1, _Alloc1 > regex_replace (const basic_string< _Elem, _Traits1, _Alloc1 > &_Str, const basic_regex< _Elem, _RxTraits > &_Re, const _Elem *_Ptr, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _RxTraits , class _Elem , class _Traits2 , class _Alloc2 >
basic_string< _Elem > regex_replace (const _Elem *_Pstr, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits2, _Alloc2 > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _RxTraits , class _Elem >
basic_string< _Elem > regex_replace (const _Elem *_Pstr, const basic_regex< _Elem, _RxTraits > &_Re, const _Elem *_Ptr, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
 
template<class _BidIt1 , class _BidIt2 , class _Pr >
_BidIt1 _Cmp_chrange (_BidIt1 _Begin1, _BidIt1 _End1, _BidIt2 _Begin2, _BidIt2 _End2, _Pr _Pred, bool _Partial)
 
template<class _BidIt1 , class _BidIt2 , class _RxTraits >
_BidIt1 _Compare (_BidIt1 _Begin1, _BidIt1 _End1, _BidIt2 _Begin2, _BidIt2 _End2, const _RxTraits &_Traits, regex_constants::syntax_option_type _Sflags, bool _Partial)
 
template<class _Elem >
bool _Lookup_range (_Elem _Ch, const _Buf< _Elem > *_Bufptr)
 
template<class _Elem , class _RxTraits >
bool _Lookup_equiv (_Elem _Ch, const _Sequence< _Elem > *_Eq, const _RxTraits &_Traits)
 
template<class _BidIt , class _Elem >
_BidIt _Lookup_coll (_BidIt _First, _BidIt _Last, const _Sequence< _Elem > *_Eq)
 

Variables

const int _BRE_MAX_GRP = 9
 
const int _Bmp_max = 256
 
const int _Bmp_shift = 3
 
const int _Bmp_chrs = 1 << _Bmp_shift
 
const int _Bmp_mask = _Bmp_chrs - 1
 
const int _Bmp_size = (_Bmp_max + _Bmp_chrs - 1) / _Bmp_chrs
 
const int _Buf_incr = 16
 
const int _ARRAY_THRESHOLD = 4
 
static const unsigned int _ECMA_flags
 
static const unsigned int _Basic_flags
 
static const unsigned int _Grep_flags
 
static const unsigned int _Extended_flags
 
static const unsigned int _Awk_flags
 
static const unsigned int _Egrep_flags
 
static const char _Meta_map []
 

Macro Definition Documentation

#define _ENHANCED_REGEX_VISUALIZER   0
#define _Isdigit (   x)    ('0' <= (x) && (x) <= '9')
#define _REGEX_
#define _REGEX_BITMASK_OPS (   Ty)
#define _REGEX_CHAR_CLASS_NAME (   n,
 
)    { n, sizeof (n)/sizeof (n[0]) - 1, c }
#define _REGEX_DIFFT (   iter)    typename iterator_traits<iter>::difference_type
#define _REGEX_MAX_COMPLEXITY_COUNT   10000000L /* set to 0 to disable */
#define _REGEX_MAX_STACK_COUNT   1000L /* set to 0 to disable */
#define _REGEX_VALT (   iter)    typename iterator_traits<iter>::value_type

Typedef Documentation

typedef match_results<const char *> cmatch
typedef regex_iterator<const char *> cregex_iterator
typedef regex_token_iterator<const char *> cregex_token_iterator
typedef sub_match<const char *> csub_match
typedef basic_regex<char> regex
typedef regex_iterator<string::const_iterator> sregex_iterator
typedef regex_token_iterator<string::const_iterator> sregex_token_iterator
typedef sub_match<string::const_iterator> ssub_match
typedef match_results<const wchar_t *> wcmatch
typedef regex_iterator<const wchar_t *> wcregex_iterator
typedef regex_token_iterator<const wchar_t *> wcregex_token_iterator
typedef sub_match<const wchar_t *> wcsub_match
typedef basic_regex<wchar_t> wregex
typedef regex_iterator<wstring::const_iterator> wsregex_iterator
typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator
typedef sub_match<wstring::const_iterator> wssub_match

Enumeration Type Documentation

Enumerator
_L_ext_rep 
_L_alt_pipe 
_L_alt_nl 
_L_nex_grp 
_L_nex_rep 
_L_nc_grp 
_L_asrt_gen 
_L_asrt_wrd 
_L_bckr 
_L_lim_bckr 
_L_ngr_rep 
_L_esc_uni 
_L_esc_hex 
_L_esc_oct 
_L_esc_bsl 
_L_esc_ffnx 
_L_esc_ffn 
_L_esc_wsd 
_L_esc_ctrl 
_L_no_nl 
_L_bzr_chr 
_L_grp_esc 
_L_ident_ECMA 
_L_ident_ERE 
_L_ident_awk 
_L_anch_rstr 
_L_star_beg 
_L_empty_grp 
_L_paren_bal 
_L_brk_rstr 
_L_mtch_long 
_L_no_subs 
2172  { // describe language properties
2173  _L_ext_rep = 0x00000001, // + and ? repetitions
2174  _L_alt_pipe = 0x00000002, // uses '|' for alternation
2175  _L_alt_nl = 0x00000004, // uses '\n' for alternation (grep, egrep)
2176  _L_nex_grp = 0x00000008, // has non-escaped capture groups
2177  _L_nex_rep = 0x00000010, // has non-escaped repeats
2178  _L_nc_grp = 0x00000020, // has non-capture groups (?:xxx)
2179  _L_asrt_gen = 0x00000040, // has generalized assertions (?=xxx), (?!xxx)
2180  _L_asrt_wrd = 0x00000080, // has word boundary assertions (\b, \B)
2181  _L_bckr = 0x00000100, // has backreferences (ERE doesn't)
2182  _L_lim_bckr = 0x00000200, // has limited backreferences (BRE \1-\9)
2183  _L_ngr_rep = 0x00000400, // has non-greedy repeats
2184  _L_esc_uni = 0x00000800, // has Unicode escape sequences
2185  _L_esc_hex = 0x00001000, // has hexadecimal escape sequences
2186  _L_esc_oct = 0x00002000, // has octal escape sequences
2187  _L_esc_bsl = 0x00004000, // has escape backslash in character classes
2188  _L_esc_ffnx = 0x00008000, // has extra file escape (\a)
2189  _L_esc_ffn = 0x00010000, // has limited file escapes (\[bfnrtv])
2190  _L_esc_wsd = 0x00020000, // has w, s, and d character set escapes
2191  _L_esc_ctrl = 0x00040000, // has control escape
2192  _L_no_nl = 0x00080000, // no newline in pattern or matching text
2193  _L_bzr_chr = 0x00100000, // \0 is a valid character constant
2194  _L_grp_esc = 0x00200000, // \ is special character in group
2195  _L_ident_ECMA = 0x00400000, // ECMA identity escape (not identifierpart)
2196  _L_ident_ERE = 0x00800000, // ERE identity escape (.[\*^$, plus {+?}()
2197  _L_ident_awk = 0x01000000, // awk identity escape ( ERE plus "/)
2198  _L_anch_rstr = 0x02000000, // anchor restricted to beginning/end
2199  _L_star_beg = 0x04000000, // star okay at beginning of RE/expr (BRE)
2200  _L_empty_grp = 0x08000000, // empty group allowed (ERE prohibits "()")
2201  _L_paren_bal = 0x10000000, // ')'/'}'/']' special only after '('/'{'/']'
2202  _L_brk_rstr = 0x20000000, // ']' not special when first character in set
2203  _L_mtch_long = 0x40000000, // find longest match (ERE, BRE)
2204  _L_no_subs = 0x80000000 // subexpression matches not recorded
2205  };
Definition: regex:2177
Definition: regex:2202
Definition: regex:2198
Definition: regex:2193
Definition: regex:2187
Definition: regex:2199
Definition: regex:2184
Definition: regex:2186
Definition: regex:2191
Definition: regex:2180
Definition: regex:2189
Definition: regex:2195
Definition: regex:2194
Definition: regex:2181
Definition: regex:2196
Definition: regex:2200
Definition: regex:2203
Definition: regex:2188
Definition: regex:2204
Definition: regex:2182
Definition: regex:2185
Definition: regex:2173
Definition: regex:2179
Definition: regex:2197
Definition: regex:2178
Definition: regex:2192
Definition: regex:2176
Definition: regex:2190
Definition: regex:2183
Definition: regex:2201
Definition: regex:2175
Definition: regex:2174
enum _Meta_type
Enumerator
_Meta_lpar 
_Meta_rpar 
_Meta_dlr 
_Meta_caret 
_Meta_dot 
_Meta_star 
_Meta_plus 
_Meta_query 
_Meta_lsq 
_Meta_rsq 
_Meta_bar 
_Meta_esc 
_Meta_dash 
_Meta_lbr 
_Meta_rbr 
_Meta_comma 
_Meta_colon 
_Meta_equal 
_Meta_exc 
_Meta_eos 
_Meta_nl 
_Meta_cr 
_Meta_bsp 
_Meta_chr 
_Esc_bsl 
_Esc_word 
_Esc_not_word 
_Esc_ctrl_a 
_Esc_ctrl_b 
_Esc_ctrl_f 
_Esc_ctrl_n 
_Esc_ctrl_r 
_Esc_ctrl_t 
_Esc_ctrl_v 
_Esc_ctrl 
_Esc_hex 
_Esc_uni 
54  { // meta character representations for parser
55  _Meta_lpar = '(',
56  _Meta_rpar = ')',
57  _Meta_dlr = '$',
58  _Meta_caret = '^',
59  _Meta_dot = '.',
60  _Meta_star = '*',
61  _Meta_plus = '+',
62  _Meta_query = '?',
63  _Meta_lsq = '[',
64  _Meta_rsq = ']',
65  _Meta_bar = '|',
66  _Meta_esc = '\\',
67  _Meta_dash = '-',
68  _Meta_lbr = '{',
69  _Meta_rbr = '}',
70  _Meta_comma = ',',
71  _Meta_colon = ':',
72  _Meta_equal = '=',
73  _Meta_exc = '!',
74  _Meta_eos = -1,
75  _Meta_nl = '\n',
76  _Meta_cr = '\r',
77  _Meta_bsp = '\b',
78  _Meta_chr = 0,
79 
80  _Esc_bsl = '\\',
81  _Esc_word = 'b',
82  _Esc_not_word = 'B',
83  _Esc_ctrl_a = 'a',
84  _Esc_ctrl_b = 'b',
85  _Esc_ctrl_f = 'f',
86  _Esc_ctrl_n = 'n',
87  _Esc_ctrl_r = 'r',
88  _Esc_ctrl_t = 't',
89  _Esc_ctrl_v = 'v',
90  _Esc_ctrl = 'c',
91  _Esc_hex = 'x',
92  _Esc_uni = 'u'
93  };
Definition: regex:74
Definition: regex:60
Definition: regex:70
Definition: regex:64
Definition: regex:73
Definition: regex:72
Definition: regex:87
Definition: regex:82
Definition: regex:90
Definition: regex:77
Definition: regex:86
Definition: regex:65
Definition: regex:58
Definition: regex:55
Definition: regex:69
Definition: regex:84
Definition: regex:91
Definition: regex:67
Definition: regex:78
Definition: regex:81
Definition: regex:71
Definition: regex:68
Definition: regex:83
Definition: regex:75
Definition: regex:88
Definition: regex:56
Definition: regex:61
Definition: regex:62
Definition: regex:92
Definition: regex:89
Definition: regex:76
Definition: regex:57
Definition: regex:80
Definition: regex:85
Definition: regex:66
Definition: regex:63
Definition: regex:59
Enumerator
_Fl_none 
_Fl_negate 
_Fl_greedy 
_Fl_final 
_Fl_longest 
1469  { // flags for nfa nodes with special properties
1470  _Fl_none = 0x00,
1471  _Fl_negate = 0x01,
1472  _Fl_greedy = 0x02,
1473  _Fl_final = 0x04,
1474  _Fl_longest = 0x08
1475  };
Definition: regex:1470
Definition: regex:1472
Definition: regex:1474
Definition: regex:1471
Definition: regex:1473
enum _Node_type
Enumerator
_N_none 
_N_nop 
_N_bol 
_N_eol 
_N_wbound 
_N_dot 
_N_str 
_N_class 
_N_group 
_N_end_group 
_N_assert 
_N_neg_assert 
_N_end_assert 
_N_capture 
_N_end_capture 
_N_back 
_N_if 
_N_endif 
_N_rep 
_N_end_rep 
_N_begin 
_N_end 
1493  { // type flag for nfa nodes
1494  _N_none,
1495  _N_nop,
1496  _N_bol,
1497  _N_eol,
1498  _N_wbound,
1499  _N_dot,
1500  _N_str,
1501  _N_class,
1502  _N_group,
1503  _N_end_group,
1504  _N_assert,
1505  _N_neg_assert,
1506  _N_end_assert,
1507  _N_capture,
1509  _N_back,
1510  _N_if,
1511  _N_endif,
1512  _N_rep,
1513  _N_end_rep,
1514  _N_begin,
1515  _N_end
1516  };
Definition: regex:1500
Definition: regex:1498
Definition: regex:1499
Definition: regex:1506
Definition: regex:1513
Definition: regex:1502
Definition: regex:1510
Definition: regex:1505
Definition: regex:1494
Definition: regex:1515
Definition: regex:1504
Definition: regex:1503
Definition: regex:1497
Definition: regex:1512
Definition: regex:1514
Definition: regex:1508
Definition: regex:1509
Definition: regex:1501
Definition: regex:1511
Definition: regex:1495
Definition: regex:1496
Definition: regex:1507
enum _Prs_ret
Enumerator
_Prs_none 
_Prs_chr 
_Prs_set 
2099  { // indicate class element type
2100  _Prs_none,
2101  _Prs_chr,
2102  _Prs_set
2103  };
Definition: regex:2101
Definition: regex:2100
Definition: regex:2102

Function Documentation

template<class _BidIt1 , class _BidIt2 , class _Pr >
_BidIt1 _Cmp_chrange ( _BidIt1  _Begin1,
_BidIt1  _End1,
_BidIt2  _Begin2,
_BidIt2  _End2,
_Pr  _Pred,
bool  _Partial 
)
inline
4216  { // compare character ranges
4217  _BidIt1 _Res = _Begin1;
4218  while (_Begin1 != _End1 && _Begin2 != _End2)
4219  if (!_Pred(*_Begin1++, *_Begin2++))
4220  return (_Res);
4221  return (_Begin2 == _End2 ? _Begin1
4222  : _Partial && _Begin1 == _End1 ? _Begin1
4223  : _Res);
4224  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
template<class _BidIt1 , class _BidIt2 , class _RxTraits >
_BidIt1 _Compare ( _BidIt1  _Begin1,
_BidIt1  _End1,
_BidIt2  _Begin2,
_BidIt2  _End2,
const _RxTraits &  _Traits,
regex_constants::syntax_option_type  _Sflags,
bool  _Partial 
)
inline
4233  { // compare character ranges
4234  _BidIt1 _Res = _End1;
4235  if (_Sflags & regex_constants::icase)
4236  _Res = _Cmp_chrange(_Begin1, _End1, _Begin2, _End2,
4237  _Cmp_icase<_RxTraits>(_Traits), _Partial);
4238  else if (_Sflags & regex_constants::collate)
4239  _Res = _Cmp_chrange(_Begin1, _End1, _Begin2, _End2,
4240  _Cmp_collate<_RxTraits>(_Traits), _Partial);
4241  else
4242  _Res = _Cmp_chrange(_Begin1, _End1, _Begin2, _End2,
4243  _Cmp_cs<_RxTraits>(), _Partial);
4244  return (_Res);
4245  }
Definition: regex:219
_BidIt1 _Cmp_chrange(_BidIt1 _Begin1, _BidIt1 _End1, _BidIt2 _Begin2, _BidIt2 _End2, _Pr _Pred, bool _Partial)
Definition: regex:4214
Definition: regex:241
Definition: regex:144
Definition: regex:209
Definition: regex:147
void _Destroy_node ( _Node_base _Nx,
_Node_base _Ne = 0 
)
inline
1647  { // destroy sublist of nodes
1648  while (_Nx != _Ne && _Nx != 0)
1649  { // destroy node
1650  _Node_base *_Tmp = _Nx;
1651  _Nx = _Nx->_Next;
1652  _Tmp->_Next = 0;
1653  delete _Tmp;
1654  }
1655  }
_Node_base * _Next
Definition: regex:1636
Definition: regex:1626
template<class _BidIt , class _Alloc , class _InIt , class _OutIt >
_OutIt _Format_default ( const match_results< _BidIt, _Alloc > &  _Match,
_OutIt  _Out,
_InIt  _First,
_InIt  _Last,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
)
inline
2577  { // format with ECMAScript rules
2578  while (_First !=_Last)
2579  { // process one character or escape sequence
2580  if (*_First != '$')
2581  *_Out++ = *_First++;
2582  else if (++_First == _Last)
2583  ;
2584  else if (*_First == '$')
2585  { // replace $$
2586  *_Out++ = '$';
2587  ++_First;
2588  }
2589  else if (*_First == '`')
2590  { // replace $`
2591  _Out = _Copy_impl(_Match.prefix().first,
2592  _Match.prefix().second, _Out);
2593  ++_First;
2594  }
2595  else if (*_First == '\'')
2596  { // replace $'
2597  _Out = _Copy_impl(_Match.suffix().first,
2598  _Match.suffix().second, _Out);
2599  ++_First;
2600  }
2601  else
2602  { // replace capture group descriptors
2603  int n = -1;
2604  if (*_First == '&')
2605  { // replace $&
2606  n = 0;
2607  ++_First;
2608  }
2609  else if (_Isdigit(*_First))
2610  { // replace $n, $nn
2611  n = *_First++ - '0';
2612  if (_First != _Last && _Isdigit(*_First))
2613  { // process second digit
2614  n *= 10;
2615  n += *_First++ - '0';
2616  }
2617  }
2618  else
2619  { // replace $x
2620  *_Out++ = '$';
2621  *_Out++ = *_First++;
2622  }
2623  if (0 <= n && n < (int)_Match.size())
2624  _Out = _Copy_impl(_Match._At(n).first,
2625  _Match._At(n).second, _Out);
2626  }
2627  }
2628  return (_Out);
2629  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
size_type size() const
Definition: regex:1140
const_reference suffix() const
Definition: regex:1180
#define _Isdigit(x)
Definition: regex:2566
const_reference prefix() const
Definition: regex:1175
_Ty1 first
Definition: utility:198
_Elem & _At(unsigned int _Sub)
Definition: regex:1407
_AMPIMP _Event __cdecl _Copy_impl(_In_ _Buffer *_Src, size_t _Src_offset, _Out_ _Buffer *_Dst, size_t _Dest_offset, size_t _Num_elems, size_t _Preferred_copy_chunk_num_elems=0)
second
Definition: utility:167
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Alloc , class _InIt , class _OutIt >
_OutIt _Format_sed ( const match_results< _BidIt, _Alloc > &  _Match,
_OutIt  _Out,
_InIt  _First,
_InIt  _Last,
regex_constants::match_flag_type  _Flags = regex_constants::format_default 
)
inline
2639  { // format with sed rules
2640  while (_First != _Last)
2641  { // process one character or escape sequence
2642  if (*_First == '&')
2643  { // replace with full match
2644  _Out = _Copy_impl(_Match._At(0).first,
2645  _Match._At(0).second, _Out);
2646  ++_First;
2647  }
2648  else if (*_First != '\\')
2649  *_Out++ = *_First++;
2650  else if (++_First == _Last)
2651  ;
2652  else if (_Isdigit(*_First))
2653  { // replace \n
2654  int n = *_First++ - '0';
2655  _Out = _Copy_impl(_Match._At(n).first,
2656  _Match._At(n).second, _Out);
2657  }
2658  else
2659  *_Out++ = *_First++;
2660  }
2661  return (_Out);
2662  }
basic_ostream< _Elem, _Traits > & _Out(basic_ostream< _Elem, _Traits > &_Os, _Ty _Dx)
Definition: random:169
#define _Isdigit(x)
Definition: regex:2566
_Ty1 first
Definition: utility:198
_Elem & _At(unsigned int _Sub)
Definition: regex:1407
_AMPIMP _Event __cdecl _Copy_impl(_In_ _Buffer *_Src, size_t _Src_offset, _Out_ _Buffer *_Dst, size_t _Dest_offset, size_t _Num_elems, size_t _Preferred_copy_chunk_num_elems=0)
second
Definition: utility:167
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Elem >
_BidIt _Lookup_coll ( _BidIt  _First,
_BidIt  _Last,
const _Sequence< _Elem > *  _Eq 
)
inline
4285  { // look for collation element [_First, _Last) in _Eq
4286  while (_Eq)
4287  { // look for sequence of elements that are the right size
4288  for (int _Ix = 0; _Ix < _Eq->_Data._Size(); _Ix += _Eq->_Sz)
4289  { // look for character range
4290  _BidIt _Res = _First;
4291  for (size_t _Jx = 0; _Jx < _Eq->_Sz; ++_Jx)
4292  { // check current character
4293  if (*_Res++ != *(_Eq->_Data._Str() + _Ix + _Jx))
4294  break;
4295  }
4296  if (_Res == _Last)
4297  return (_Last);
4298  }
4299  _Eq = _Eq->_Next;
4300  }
4301  return (_First);
4302  }
_Buf< _Elem > _Data
Definition: regex:1621
_Sequence * _Next
Definition: regex:1622
unsigned int _Sz
Definition: regex:1620
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem , class _RxTraits >
bool _Lookup_equiv ( _Elem  _Ch,
const _Sequence< _Elem > *  _Eq,
const _RxTraits &  _Traits 
)
inline
4263  { // check whether _Ch is in _Eq
4264  typename _RxTraits::string_type _Str0;
4265  typename _RxTraits::string_type _Str1(1, _Ch);
4266  _Str1 = _Traits.transform_primary(_Str1.begin(), _Str1.end());
4267  while (_Eq)
4268  { // look for sequence of elements that are the right size
4269  for (int _Ix = 0; _Ix < _Eq->_Data._Size(); _Ix += _Eq->_Sz)
4270  { // look for _Ch
4271  _Str0.assign(_Eq->_Data._Str() + _Ix, _Eq->_Sz);
4272  _Str0 = _Traits.transform_primary(_Str0.begin(), _Str0.end());
4273  if (_Str0 == _Str1)
4274  return (true);
4275  }
4276  _Eq = _Eq->_Next;
4277  }
4278  return (false);
4279  }
_Buf< _Elem > _Data
Definition: regex:1621
_Sequence * _Next
Definition: regex:1622
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
unsigned int _Sz
Definition: regex:1620
template<class _Elem >
bool _Lookup_range ( _Elem  _Ch,
const _Buf< _Elem > *  _Bufptr 
)
inline
4249  { // check whether _Ch is in _Buf
4250  for (int _Ix = 0; _Ix < _Bufptr->_Size(); _Ix += 2)
4251  { // check current position
4252  if (_Bufptr->_At(_Ix) <= _Ch
4253  && _Ch <= _Bufptr->_At(_Ix + 1))
4254  return (true);
4255  }
4256  return (false);
4257  }
int _Size() const
Definition: regex:1532
_Elem _At(unsigned int _Idx) const
Definition: regex:1537
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_CRTIMP2_PURE _NO_RETURN ( __CLRCALL_PURE_OR_CDECL   _Xregex_errorregex_constants::error_type _Code)
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits , class _It >
bool _Regex_match ( _It  _First,
_It  _Last,
match_results< _BidIt, _Alloc > *  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs,
bool  _Full 
)
inline
2677  { // try to match regular expression to target text
2678  if (_Re._Empty())
2679  return (false);
2681  _Re._Get_traits(), _Re._Get(), _Re.mark_count() + 1, _Re.flags(),
2682  _Flgs);
2683  return (_Mx._Match(_Matches, _Full));
2684  }
unsigned int mark_count() const
Definition: regex:2406
flag_type flags() const
Definition: regex:2455
bool _Empty() const
Definition: regex:2485
_Root_node * _Get() const
Definition: regex:2480
const _RxTraits & _Get_traits() const
Definition: regex:2490
_FwdIt _Last
Definition: algorithm:1936
Definition: regex:1968
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem , class _Traits , class _Alloc >
_OutIt _Regex_replace ( _OutIt  _Result,
_BidIt  _First,
_BidIt  _Last,
const basic_regex< _Elem, _RxTraits > &  _Re,
const basic_string< _Elem, _Traits, _Alloc > &  _Fmt,
regex_constants::match_flag_type  _Flgs 
)
inline
2924  { // search and replace
2925  match_results<_BidIt> _Matches;
2926  _BidIt _Pos = _First;
2927  regex_constants::match_flag_type _Flags = _Flgs;
2930 
2931  while (regex_search(_Pos, _Last, _Matches, _Re, _Flags | _Not_null))
2932  { // replace at each match
2933  if (!(_Flgs & regex_constants::format_no_copy))
2934  _Result = _Copy_impl(_Matches.prefix().first,
2935  _Matches.prefix().second, _Result);
2936  _Result = _Matches._Format(_Result,
2937  _Unchecked(_Fmt.begin()), _Unchecked(_Fmt.end()), _Flags);
2938 
2939  _Pos = _Matches[0].second;
2940  if (_Pos == _Last
2942  break;
2943 
2944  if (_Matches[0].first == _Matches[0].second)
2946  else
2947  { // non-null match, recognize earlier text
2948  _Not_null = (regex_constants::match_flag_type)0;
2950  }
2951  }
2952  return (_Flgs & regex_constants::format_no_copy
2953  ? _Result : _Copy_impl(_Pos, _Last, _Result));
2954  }
bool regex_search(_BidIt _First, _BidIt _Last, match_results< _BidIt, _Alloc > &_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2827
match_flag_type
Definition: regex:152
const_reference prefix() const
Definition: regex:1175
_Ty1 first
Definition: utility:198
Definition: regex:166
iterator end() _NOEXCEPT
Definition: xstring:1608
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
iterator begin() _NOEXCEPT
Definition: xstring:1598
_AMPIMP _Event __cdecl _Copy_impl(_In_ _Buffer *_Src, size_t _Src_offset, _Out_ _Buffer *_Dst, size_t _Dest_offset, size_t _Num_elems, size_t _Preferred_copy_chunk_num_elems=0)
_OutIt _Format(_OutIt _Out, const char_type *_Fmt_begin, const char_type *_Fmt_end, regex_constants::match_flag_type _Flags) const
Definition: regex:1206
second
Definition: utility:167
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits , class _It >
bool _Regex_search ( _It  _First,
_It  _Last,
match_results< _BidIt, _Alloc > *  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs,
_It  _Org 
)
inline
2786  { // search for regular expression match in target text
2787  _DEBUG_RANGE(_First, _Last);
2788  if (_Re._Empty())
2789  return (false);
2790  bool _Found = false;
2791  _It _Begin = _First;
2793  _Re._Get_traits(), _Re._Get(), _Re.mark_count() + 1, _Re.flags(),
2794  _Flgs);
2795 
2796  if (_Mx._Match(_Matches, false))
2797  _Found = true;
2798  else if (_First == _Last
2800  ;
2801  else
2802  { // try more on suffixes
2804  _Mx._Clearf(regex_constants::_Match_not_null);
2805  while ((_First = _Mx._Skip(++_First, _Last)) != _Last)
2806  if (_Mx._Match(_First, _Matches, false))
2807  { // found match starting at _First
2808  _Found = true;
2809  break;
2810  }
2811  if (!_Found && _Mx._Match(_Last, _Matches, false))
2812  _Found = true;
2813  }
2814  if (_Found && _Matches)
2815  { // update _Matches
2816  _Matches->_Org = _Org;
2817  _Matches->_Pfx().first = _Begin;
2818  }
2819  return (_Found);
2820  }
_BidIt _Org
Definition: regex:1417
unsigned int mark_count() const
Definition: regex:2406
#define _DEBUG_RANGE(first, last)
Definition: xutility:467
flag_type flags() const
Definition: regex:2455
_Ty1 first
Definition: utility:198
void _Setf(regex_constants::match_flag_type _Mf)
Definition: regex:1985
_Elem & _Pfx()
Definition: regex:1392
bool _Empty() const
Definition: regex:2485
_Root_node * _Get() const
Definition: regex:2480
const _RxTraits & _Get_traits() const
Definition: regex:2490
_FwdIt _Last
Definition: algorithm:1936
Definition: regex:1968
template<class _InIt1 , class _InIt2 , class _Pr >
bool _Same ( _InIt1  _First1,
_InIt1  _Last1,
_InIt2  _First2,
_InIt2  _Last2,
_Pr  _Pred 
)
266  { // return true if two sequences match using _Pred
267  while (_First1 != _Last1 && _First2 != _Last2)
268  if (!_Pred(*_First1++, *_First2++))
269  return (false);
270  return (_First1 == _Last1 && _First2 == _Last2);
271  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
template<class _BidIt >
bool operator!= ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
670  { // test for inequality
671  return (!(_Left == _Right));
672  }
template<class _BidIt >
bool operator!= ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
719  { // test for inequality
720  return (!(_Left == _Right));
721  }
template<class _BidIt >
bool operator!= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
767  { // test for inequality
768  return (!(_Left == _Right));
769  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator!= ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
817  { // test for inequality
818  return (!(_Left == _Right));
819  }
template<class _BidIt >
bool operator!= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
867  { // test for inequality
868  return (!(_Left == _Right));
869  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator!= ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
921  { // test for inequality
922  return (!(_Left == _Right));
923  }
template<class _BidIt , class _Traits , class _Alloc >
bool operator!= ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
981  { // test for inequality
982  return (!(_Left == _Right));
983  }
template<class _BidIt , class _Alloc >
bool operator!= ( const match_results< _BidIt, _Alloc > &  _Left,
const match_results< _BidIt, _Alloc > &  _Right 
)
1452  { // compare results for inequality
1453  return (!(_Left == _Right));
1454  }
template<class _BidIt >
bool operator< ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
678  { // test if _Left < _Right
679  return (_Left.compare(_Right) < 0);
680  }
int compare(const sub_match &_Right) const
Definition: regex:635
template<class _BidIt >
bool operator< ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
727  { // test if _Left < _Right
728  return (0 < _Right.compare(_Left));
729  }
int compare(const sub_match &_Right) const
Definition: regex:635
template<class _BidIt >
bool operator< ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
775  { // test if _Left < _Right
776  return (_Left.compare(_Right) < 0);
777  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator< ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
825  { // test if _Left < _Right
826  typename sub_match<_BidIt>::string_type _Str(1, _Left);
827  return (0 < _Right.compare(_Str));
828  }
int compare(const sub_match &_Right) const
Definition: regex:635
Definition: xstring:21
template<class _BidIt >
bool operator< ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
875  { // test if _Left < _Right
876  typename sub_match<_BidIt>::string_type _Str(1, _Right);
877  return (_Left.compare(_Str) < 0);
878  }
int compare(const sub_match &_Right) const
Definition: regex:635
Definition: xstring:21
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator< ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
931  { // test if _Left < _Right
932  return (_Left.compare(_Right.c_str()) < 0);
933  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
template<class _BidIt , class _Traits , class _Alloc >
bool operator< ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
991  { // test if _Left < _Right
992  return (0 < _Right.compare(_Left.c_str()));
993  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
template<class _Elem , class _Traits , class _BidIt >
basic_ostream<_Elem, _Traits>& operator<< ( basic_ostream< _Elem, _Traits > &  _Ostr,
const sub_match< _BidIt > &  _Match 
)
1032  { // insert into basic_ostream
1033  return (_Ostr << _Match.str());
1034  }
string_type str() const
Definition: regex:628
template<class _BidIt >
bool operator<= ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
694  { // test if _Left <= _Right
695  return (!(_Right < _Left));
696  }
template<class _BidIt >
bool operator<= ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
743  { // test if _Left <= _Right
744  return (!(_Right < _Left));
745  }
template<class _BidIt >
bool operator<= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
791  { // test if _Left <= _Right
792  return (!(_Right < _Left));
793  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator<= ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
842  { // test if _Left <= _Right
843  return (!(_Right < _Left));
844  }
template<class _BidIt >
bool operator<= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
892  { // test if _Left <= _Right
893  return (!(_Right < _Left));
894  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator<= ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
951  { // test if _Left <= _Right
952  return (!(_Right < _Left));
953  }
template<class _BidIt , class _Traits , class _Alloc >
bool operator<= ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
1011  { // test if _Left <= _Right
1012  return (!(_Right < _Left));
1013  }
template<class _BidIt >
bool operator== ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
662  { // test for equality
663  return (_Left.compare(_Right) == 0);
664  }
int compare(const sub_match &_Right) const
Definition: regex:635
template<class _BidIt >
bool operator== ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
711  { // test for equality
712  return (_Right.compare(_Left) == 0);
713  }
int compare(const sub_match &_Right) const
Definition: regex:635
template<class _BidIt >
bool operator== ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
759  { // test for equality
760  return (_Left.compare(_Right) == 0);
761  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator== ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
808  { // test for equality
809  typename sub_match<_BidIt>::string_type _Str(1, _Left);
810  return (_Right.compare(_Str) == 0);
811  }
int compare(const sub_match &_Right) const
Definition: regex:635
Definition: xstring:21
template<class _BidIt >
bool operator== ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
858  { // test for equality
859  typename sub_match<_BidIt>::string_type _Str(1, _Right);
860  return (_Left.compare(_Str) == 0);
861  }
int compare(const sub_match &_Right) const
Definition: regex:635
Definition: xstring:21
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator== ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
911  { // test for equality
912  return (_Left.compare(_Right.c_str()) == 0);
913  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
template<class _BidIt , class _Traits , class _Alloc >
bool operator== ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
971  { // test for equality
972  return (_Right.compare(_Left.c_str()) == 0);
973  }
int compare(const sub_match &_Right) const
Definition: regex:635
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
template<class _BidIt , class _Alloc >
bool operator== ( const match_results< _BidIt, _Alloc > &  _Left,
const match_results< _BidIt, _Alloc > &  _Right 
)
1432  { // compare results for equality
1433  if (!_Left.ready() && !_Right.ready())
1434  return (true);
1435  else if (!_Left.ready() || !_Right.ready())
1436  return (false);
1437  else if (_Left.empty() && _Right.empty())
1438  return (true);
1439  else if (_Left.empty() || _Right.empty())
1440  return (false);
1441  else
1442  return (_Left.size() == _Right.size()
1443  && _Left.prefix() == _Right.prefix()
1444  && _Left.suffix() == _Right.suffix()
1445  && _STD equal(_Left.begin(), _Left.end(), _Right.begin()));
1446  }
size_type size() const
Definition: regex:1140
bool empty() const
Definition: regex:1150
const_reference suffix() const
Definition: regex:1180
const_iterator end() const
Definition: regex:1190
const_reference prefix() const
Definition: regex:1175
bool ready() const
Definition: regex:1135
const_iterator begin() const
Definition: regex:1185
bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2)
Definition: memory:611
template<class _BidIt >
bool operator> ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
686  { // test if _Left > _Right
687  return (_Right < _Left);
688  }
template<class _BidIt >
bool operator> ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
735  { // test if _Left > _Right
736  return (_Right < _Left);
737  }
template<class _BidIt >
bool operator> ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
783  { // test if _Left > _Right
784  return (_Right < _Left);
785  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator> ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
834  { // test if _Left > _Right
835  return (_Right < _Left);
836  }
template<class _BidIt >
bool operator> ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
884  { // test if _Left > _Right
885  return (_Right < _Left);
886  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator> ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
941  { // test if _Left > _Right
942  return (_Right < _Left);
943  }
template<class _BidIt , class _Traits , class _Alloc >
bool operator> ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
1001  { // test if _Left > _Right
1002  return (_Right < _Left);
1003  }
template<class _BidIt >
bool operator>= ( const sub_match< _BidIt > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
702  { // test if _Left >= _Right
703  return (!(_Left < _Right));
704  }
template<class _BidIt >
bool operator>= ( const _REGEX_VALT(_BidIt)*  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
751  { // test if _Left >= _Right
752  return (!(_Left < _Right));
753  }
template<class _BidIt >
bool operator>= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)*  _Right 
)
inline
799  { // test if _Left >= _Right
800  return (!(_Left < _Right));
801  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt >
bool operator>= ( const _REGEX_VALT(_BidIt)&  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
850  { // test if _Left >= _Right
851  return (!(_Left < _Right));
852  }
template<class _BidIt >
bool operator>= ( const sub_match< _BidIt > &  _Left,
const _REGEX_VALT(_BidIt)&  _Right 
)
inline
900  { // test if _Left >= _Right
901  return (!(_Left < _Right));
902  }
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Traits , class _Alloc >
bool operator>= ( const sub_match< _BidIt > &  _Left,
const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Right 
)
inline
961  { // test if _Left >= _Right
962  return (!(_Left < _Right));
963  }
template<class _BidIt , class _Traits , class _Alloc >
bool operator>= ( const basic_string< _REGEX_VALT(_BidIt), _Traits, _Alloc > &  _Left,
const sub_match< _BidIt > &  _Right 
)
inline
1021  { // test if _Left >= _Right
1022  return (!(_Left < _Right));
1023  }
_Node_flags operator^= ( _Node_flags _Left,
_Node_flags  _Right 
)
inline
1488  { // bitwise xor
1489  return (_Left = _Node_flags((int)_Left ^ _Right));
1490  }
_Node_flags
Definition: regex:1468
const _Ty & _Right
Definition: algorithm:4087
_Node_flags operator| ( _Node_flags  _Left,
_Node_flags  _Right 
)
inline
1478  { // bitwise or
1479  return (_Node_flags((int)_Left | _Right));
1480  }
_Node_flags
Definition: regex:1468
const _Ty & _Right
Definition: algorithm:4087
_Node_flags operator|= ( _Node_flags _Left,
_Node_flags  _Right 
)
inline
1483  { // bitwise or
1484  return (_Left = _Node_flags((int)_Left | _Right));
1485  }
_Node_flags
Definition: regex:1468
const _Ty & _Right
Definition: algorithm:4087
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits >
bool regex_match ( _BidIt  _First,
_BidIt  _Last,
match_results< _BidIt, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2696  { // try to match regular expression to target text
2697  return (_Regex_match(_First, _Last,
2698  &_Matches, _Re, _Flgs, true));
2699  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Elem , class _RxTraits >
bool regex_match ( _BidIt  _First,
_BidIt  _Last,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2708  { // try to match regular expression to target text
2709  return (_Regex_match(_First, _Last,
2710  (match_results<_BidIt> *)0, _Re,
2711  _Flgs | regex_constants::match_any, true));
2712  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
Definition: regex:159
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem , class _RxTraits >
bool regex_match ( _In_z_ const _Elem *  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2720  { // try to match regular expression to target text
2721  const _Elem *_Last = _Str + char_traits<_Elem>::length(_Str);
2722  return (_Regex_match(_Str, _Last,
2723  (match_results<const _Elem *> *)0, _Re,
2724  _Flgs | regex_constants::match_any, true));
2725  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
Definition: regex:159
Definition: regex:1039
_FwdIt _Last
Definition: algorithm:1936
static size_t __CLRCALL_OR_CDECL length(_In_z_ const _Elem *_First)
Definition: iosfwd:151
template<class _Elem , class _Alloc , class _RxTraits >
bool regex_match ( _In_z_ const _Elem *  _Str,
match_results< const _Elem *, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2735  { // try to match regular expression to target text
2736  const _Elem *_Last = _Str + char_traits<_Elem>::length(_Str);
2737  return (_Regex_match(_Str, _Last,
2738  &_Matches, _Re, _Flgs, true));
2739  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
_FwdIt _Last
Definition: algorithm:1936
static size_t __CLRCALL_OR_CDECL length(_In_z_ const _Elem *_First)
Definition: iosfwd:151
template<class _StTraits , class _StAlloc , class _Alloc , class _Elem , class _RxTraits >
bool regex_match ( const basic_string< _Elem, _StTraits, _StAlloc > &  _Str,
match_results< typename basic_string< _Elem, _StTraits, _StAlloc >::const_iterator, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2753  { // try to match regular expression to target text
2754  return (_Regex_match(_Str.begin(), _Str.end(),
2755  &_Matches, _Re, _Flgs, true));
2756  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
iterator end() _NOEXCEPT
Definition: xstring:1608
iterator begin() _NOEXCEPT
Definition: xstring:1598
template<class _StTraits , class _StAlloc , class _Elem , class _RxTraits >
bool regex_match ( const basic_string< _Elem, _StTraits, _StAlloc > &  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2767  { // try to match regular expression to target text
2769  ::const_iterator _Iter;
2770  return (_Regex_match(_Str.begin(), _Str.end(),
2771  (match_results<_Iter> *)0, _Re,
2772  _Flgs | regex_constants::match_any, true));
2773  }
bool _Regex_match(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, bool _Full)
Definition: regex:2672
Definition: regex:159
Definition: regex:1039
iterator end() _NOEXCEPT
Definition: xstring:1608
iterator begin() _NOEXCEPT
Definition: xstring:1598
Definition: xstring:21
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem , class _Traits , class _Alloc >
_OutIt regex_replace ( _OutIt  _Result,
_BidIt  _First,
_BidIt  _Last,
const basic_regex< _Elem, _RxTraits > &  _Re,
const basic_string< _Elem, _Traits, _Alloc > &  _Fmt,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2969  { // search and replace, iterator result, string format
2970  return (_Rechecked(_Result,
2971  _Regex_replace(_Unchecked(_Result),
2972  _Unchecked(_First), _Unchecked(_Last),
2973  _Re, _Fmt, _Flgs)));
2974  }
_OutIt _Regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs)
Definition: regex:2919
_Deque_const_iterator< _Mydeque > & _Rechecked(_Deque_const_iterator< _Mydeque > &_Iter, typename _Deque_const_iterator< _Mydeque >::_Unchecked_type _Right)
Definition: deque:547
_Iter_t _Unchecked(_Iter_t _Iter)
Definition: iterator:11
_FwdIt _Last
Definition: algorithm:1936
template<class _OutIt , class _BidIt , class _RxTraits , class _Elem >
_OutIt regex_replace ( _OutIt  _Result,
_BidIt  _First,
_BidIt  _Last,
const basic_regex< _Elem, _RxTraits > &  _Re,
const _Elem *  _Ptr,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
3061  { // search and replace, iterator result, NTBS format
3062  const basic_string<_Elem> _Fmt(_Ptr);
3063  return (regex_replace(_Result,
3064  _First, _Last, _Re, _Fmt, _Flgs));
3065  }
_OutIt regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2963
Definition: xstring:21
_FwdIt _Last
Definition: algorithm:1936
template<class _RxTraits , class _Elem , class _Traits1 , class _Alloc1 , class _Traits2 , class _Alloc2 >
basic_string<_Elem, _Traits1, _Alloc1> regex_replace ( const basic_string< _Elem, _Traits1, _Alloc1 > &  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
const basic_string< _Elem, _Traits2, _Alloc2 > &  _Fmt,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
3079  { // search and replace, string result, string target, string format
3081  regex_replace(_STD back_inserter(_Res), _Str.begin(), _Str.end(),
3082  _Re, _Fmt, _Flgs);
3083  return (_Res);
3084  }
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
iterator end() _NOEXCEPT
Definition: xstring:1608
iterator begin() _NOEXCEPT
Definition: xstring:1598
_OutIt regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2963
Definition: xstring:21
template<class _RxTraits , class _Elem , class _Traits1 , class _Alloc1 >
basic_string<_Elem, _Traits1, _Alloc1> regex_replace ( const basic_string< _Elem, _Traits1, _Alloc1 > &  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
const _Elem *  _Ptr,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
3096  { // search and replace, string result, string target, NTBS format
3098  const basic_string<_Elem> _Fmt(_Ptr);
3099  regex_replace(_STD back_inserter(_Res), _Str.begin(), _Str.end(),
3100  _Re, _Fmt, _Flgs);
3101  return (_Res);
3102  }
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
iterator end() _NOEXCEPT
Definition: xstring:1608
iterator begin() _NOEXCEPT
Definition: xstring:1598
_OutIt regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2963
Definition: xstring:21
template<class _RxTraits , class _Elem , class _Traits2 , class _Alloc2 >
basic_string<_Elem> regex_replace ( const _Elem *  _Pstr,
const basic_regex< _Elem, _RxTraits > &  _Re,
const basic_string< _Elem, _Traits2, _Alloc2 > &  _Fmt,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
3114  { // search and replace, string result, NTBS target, string format
3115  basic_string<_Elem> _Res;
3116  const basic_string<_Elem> _Str(_Pstr);
3117  regex_replace(_STD back_inserter(_Res), _Str.begin(), _Str.end(),
3118  _Re, _Fmt, _Flgs);
3119  return (_Res);
3120  }
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
_OutIt regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2963
Definition: xstring:21
template<class _RxTraits , class _Elem >
basic_string<_Elem> regex_replace ( const _Elem *  _Pstr,
const basic_regex< _Elem, _RxTraits > &  _Re,
const _Elem *  _Ptr,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
3130  { // search and replace, string result, NTBS target, NTBS format
3131  basic_string<_Elem> _Res;
3132  const basic_string<_Elem> _Str(_Pstr);
3133  const basic_string<_Elem> _Fmt(_Ptr);
3134  regex_replace(_STD back_inserter(_Res), _Str.begin(), _Str.end(),
3135  _Re, _Fmt, _Flgs);
3136  return (_Res);
3137  }
back_insert_iterator< _Container > back_inserter(_Container &_Cont)
Definition: iterator:69
_OutIt regex_replace(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex< _Elem, _RxTraits > &_Re, const basic_string< _Elem, _Traits, _Alloc > &_Fmt, regex_constants::match_flag_type _Flgs=regex_constants::match_default)
Definition: regex:2963
Definition: xstring:21
template<class _BidIt , class _Alloc , class _Elem , class _RxTraits >
bool regex_search ( _BidIt  _First,
_BidIt  _Last,
match_results< _BidIt, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2832  { // search for regular expression match in target text
2833  return (_Regex_search(_First, _Last, &_Matches, _Re, _Flgs, _First));
2834  }
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
_FwdIt _Last
Definition: algorithm:1936
template<class _BidIt , class _Elem , class _RxTraits >
bool regex_search ( _BidIt  _First,
_BidIt  _Last,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2843  { // search for regular expression match in target text
2844  return (_Regex_search(_First, _Last,
2845  (match_results<_BidIt> *)0, _Re,
2846  _Flgs | regex_constants::match_any, _First));
2847  }
Definition: regex:159
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem , class _RxTraits >
bool regex_search ( _In_z_ const _Elem *  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2855  { // search for regular expression match in target text
2856  const _Elem *_Last = _Str + char_traits<_Elem>::length(_Str);
2857  return (_Regex_search(_Str, _Last,
2858  (match_results<const _Elem *> *)0, _Re,
2859  _Flgs | regex_constants::match_any, _Str));
2860  }
Definition: regex:159
Definition: regex:1039
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
_FwdIt _Last
Definition: algorithm:1936
static size_t __CLRCALL_OR_CDECL length(_In_z_ const _Elem *_First)
Definition: iosfwd:151
template<class _Elem , class _Alloc , class _RxTraits >
bool regex_search ( _In_z_ const _Elem *  _Str,
match_results< const _Elem *, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2870  { // search for regular expression match in target text
2871  const _Elem *_Last = _Str + char_traits<_Elem>::length(_Str);
2872  return (_Regex_search(_Str, _Last, &_Matches, _Re, _Flgs, _Str));
2873  }
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
_FwdIt _Last
Definition: algorithm:1936
static size_t __CLRCALL_OR_CDECL length(_In_z_ const _Elem *_First)
Definition: iosfwd:151
template<class _StTraits , class _StAlloc , class _Alloc , class _Elem , class _RxTraits >
bool regex_search ( const basic_string< _Elem, _StTraits, _StAlloc > &  _Str,
match_results< typename basic_string< _Elem, _StTraits, _StAlloc >::const_iterator, _Alloc > &  _Matches,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2887  { // search for regular expression match in target text
2888  return (_Regex_search(_Str.begin(), _Str.end(),
2889  &_Matches, _Re, _Flgs, _Str.begin()));
2890  }
iterator end() _NOEXCEPT
Definition: xstring:1608
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
iterator begin() _NOEXCEPT
Definition: xstring:1598
template<class _StTraits , class _StAlloc , class _Elem , class _RxTraits >
bool regex_search ( const basic_string< _Elem, _StTraits, _StAlloc > &  _Str,
const basic_regex< _Elem, _RxTraits > &  _Re,
regex_constants::match_flag_type  _Flgs = regex_constants::match_default 
)
inline
2901  { // search for regular expression match in target text
2903  ::const_pointer _Iter;
2904 
2905  const _Elem *_First = _Str.c_str();
2906  const _Elem *_Last = _First + _Str.size();
2907  return (_Regex_search(_First, _Last,
2908  (match_results<_Iter> *)0, _Re,
2909  _Flgs | regex_constants::match_any, _First));
2910  }
Definition: regex:159
Definition: regex:1039
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1737
bool _Regex_search(_It _First, _It _Last, match_results< _BidIt, _Alloc > *_Matches, const basic_regex< _Elem, _RxTraits > &_Re, regex_constants::match_flag_type _Flgs, _It _Org)
Definition: regex:2781
size_type size() const _NOEXCEPT
Definition: xstring:1752
Definition: xstring:21
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem , class _RxTraits >
void swap ( basic_regex< _Elem, _RxTraits > &  _Left,
basic_regex< _Elem, _RxTraits > &  _Right 
)
2547  { // exchange contents of _Left with _Right
2548  _Left.swap(_Right);
2549  }
void swap(_Myt &_Right) _THROW0()
Definition: regex:2471
template<class _BidIt , class _Alloc >
void swap ( match_results< _BidIt, _Alloc > &  _Left,
match_results< _BidIt, _Alloc > &  _Right 
)
2555  { // exchange contents of _Left with _Right
2556  _Left.swap(_Right);
2557  }
void swap(match_results &_Right)
Definition: regex:1378

Variable Documentation

const int _ARRAY_THRESHOLD = 4
const unsigned int _Awk_flags
static
Initial value:
=
Definition: regex:2186
static const unsigned int _Extended_flags
Definition: regex:4767
Definition: regex:2189
Definition: regex:2188
Definition: regex:2197
const unsigned int _Basic_flags
static
Initial value:
=
Definition: regex:2202
Definition: regex:2198
Definition: regex:2199
Definition: regex:2181
Definition: regex:2200
Definition: regex:2203
Definition: regex:2182
const int _Bmp_chrs = 1 << _Bmp_shift
const int _Bmp_mask = _Bmp_chrs - 1
const int _Bmp_max = 256
const int _Bmp_shift = 3
const int _Bmp_size = (_Bmp_max + _Bmp_chrs - 1) / _Bmp_chrs
const int _BRE_MAX_GRP = 9
const int _Buf_incr = 16
const unsigned int _ECMA_flags
static
Initial value:
=
Definition: regex:2177
Definition: regex:2193
Definition: regex:2187
Definition: regex:2184
Definition: regex:2191
Definition: regex:2180
Definition: regex:2189
Definition: regex:2195
Definition: regex:2194
Definition: regex:2181
Definition: regex:2200
Definition: regex:2185
Definition: regex:2173
Definition: regex:2179
Definition: regex:2178
Definition: regex:2176
Definition: regex:2190
Definition: regex:2183
Definition: regex:2174
const unsigned int _Egrep_flags
static
Initial value:
=
static const unsigned int _Extended_flags
Definition: regex:4767
Definition: regex:2192
Definition: regex:2175
const unsigned int _Extended_flags
static
Initial value:
=
Definition: regex:2177
Definition: regex:2202
Definition: regex:2196
Definition: regex:2203
Definition: regex:2173
Definition: regex:2176
Definition: regex:2201
Definition: regex:2174
const unsigned int _Grep_flags
static
Initial value:
=
Definition: regex:2192
static const unsigned int _Basic_flags
Definition: regex:4760
Definition: regex:2175
const char _Meta_map[]
static
Initial value:
= {
0}
Definition: regex:60
Definition: regex:70
Definition: regex:64
Definition: regex:73
Definition: regex:72
Definition: regex:77
Definition: regex:65
Definition: regex:58
Definition: regex:55
Definition: regex:69
Definition: regex:67
Definition: regex:71
Definition: regex:68
Definition: regex:75
Definition: regex:56
Definition: regex:61
Definition: regex:62
Definition: regex:76
Definition: regex:57
Definition: regex:66
Definition: regex:63
Definition: regex:59