This header is part of the regular expressions library.
Namespace std::regex_constants
Types | |
Defined in namespace std::regex_constants | |
---|---|
(C++11) | general options controlling regex behavior (typedef) |
(C++11) | options specific to matching (typedef) |
(C++11) | describes different types of matching errors (typedef) |
Classes
(C++11) | regular expression object (class template) |
(C++11) | identifies the sequence of characters matched by a sub-expression (class template) |
(C++11) | identifies one regular expression match, including all sub-expression matches (class template) |
(C++11) | iterates through all regex matches within a character sequence (class template) |
(C++11) | iterates through the specified sub-expressions within all regex matches in a given string or through unmatched substrings (class template) |
(C++11) | reports errors generated by the regular expressions library (class) |
(C++11) | provides metainformation about a character type, required by the regex library (class template) |
Functions
Algorithm | |
(C++11) | attempts to match a regular expression to an entire character sequence (function template) |
(C++11) | attempts to match a regular expression to any part of a character sequence (function template) |
(C++11) | replaces occurrences of a regular expression with formatted replacement text (function template) |
Non-member operations | |
(C++11) | specializes the std::swap algorithm (function template) |
compares two sub_match objects (function) | |
outputs the matched character subsequence (function template) | |
lexicographically compares the values in the two match result (function template) | |
(C++11) | specializes the std::swap() algorithm (function template) |
Synopsis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | #include <initializer_list> namespace std { // regex constants: namespace regex_constants { enum error_type; } // namespace regex_constants // class regex_error: class regex_error; // class template regex_traits: template < class charT> struct regex_traits; // class template basic_regex: template < class charT, class traits = regex_traits<charT> > class basic_regex; typedef basic_regex< char > regex; typedef basic_regex< wchar_t > wregex; // basic_regex swap: template < class charT, class traits> void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2); // class template sub_match: template < class BidirectionalIterator> class sub_match; typedef sub_match< const char *> csub_match; typedef sub_match< const wchar_t *> wcsub_match; typedef sub_match<string::const_iterator> ssub_match; typedef sub_match<wstring::const_iterator> wssub_match; // sub_match non-member operators: template < class BiIter> bool operator==( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator!=( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<=( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>=( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>( const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator==( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator!=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator<( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator>( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator>=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator<=( const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& lhs, const sub_match<BiIter>& rhs); template < class BiIter, class ST, class SA> bool operator==( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter, class ST, class SA> bool operator!=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter, class ST, class SA> bool operator<( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter, class ST, class SA> bool operator>( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter, class ST, class SA> bool operator<=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter, class ST, class SA> bool operator>=( const sub_match<BiIter>& lhs, const basic_string< typename iterator_traits<BiIter>::value_type, ST, SA>& rhs); template < class BiIter> bool operator==( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator!=( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>=( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<=( typename iterator_traits<BiIter>::value_type const * lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator==( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator!=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator<=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator>=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator<( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator>( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const * rhs); template < class BiIter> bool operator==( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator!=( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>=( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<=( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator>( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator<( typename iterator_traits<BiIter>::value_type const & lhs, const sub_match<BiIter>& rhs); template < class BiIter> bool operator==( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class BiIter> bool operator!=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class BiIter> bool operator>=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class BiIter> bool operator<=( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class BiIter> bool operator<( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class BiIter> bool operator>( const sub_match<BiIter>& lhs, typename iterator_traits<BiIter>::value_type const & rhs); template < class charT, class ST, class BiIter> basic_ostream<charT, ST>& operator<<(basic_ostream<charT, ST>& os, const sub_match<BiIter>& m); // class template match_results: template < class BidirectionalIterator, class Allocator = allocator<sub_match<BidirectionalIterator> > > class match_results; typedef match_results< const char *> cmatch; typedef match_results< const wchar_t *> wcmatch; typedef match_results<string::const_iterator> smatch; typedef match_results<wstring::const_iterator> wsmatch; // match_results comparisons template < class BidirectionalIterator, class Allocator> bool operator== ( const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2); template < class BidirectionalIterator, class Allocator> bool operator!= ( const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2); // match_results swap: template < class BidirectionalIterator, class Allocator> void swap(match_results<BidirectionalIterator, Allocator>& m1, match_results<BidirectionalIterator, Allocator>& m2); // function template regex_match: template < class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class BidirectionalIterator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class charT, class Allocator, class traits> bool regex_match( const charT* str, match_results< const charT*, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class ST, class SA, class Allocator, class charT, class traits> bool regex_match( const basic_string<charT, ST, SA>& s, match_results< typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class charT, class traits> bool regex_match( const charT* str, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class ST, class SA, class charT, class traits> bool regex_match( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); // function template regex_search: template < class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class BidirectionalIterator, class charT, class traits> bool regex_search(BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class charT, class Allocator, class traits> bool regex_search( const charT* str, match_results< const charT*, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class charT, class traits> bool regex_search( const charT* str, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class ST, class SA, class charT, class traits> bool regex_search( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template < class ST, class SA, class Allocator, class charT, class traits> bool regex_search( const basic_string<charT, ST, SA>& s, match_results< typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); // function template regex_replace: template < class OutputIterator, class BidirectionalIterator, class traits, class charT, class ST, class SA> OutputIterator regex_replace( OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const basic_string<charT, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template < class OutputIterator, class BidirectionalIterator, class traits, class charT> OutputIterator regex_replace( OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template < class traits, class charT, class ST, class SA, class FST, class FSA> basic_string<charT, ST, SA> regex_replace( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, const basic_string<charT, FST, FSA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template < class traits, class charT, class ST, class SA> basic_string<charT, ST, SA> regex_replace( const basic_string<charT, ST, SA>& s, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template < class traits, class charT, class ST, class SA> basic_string<charT> regex_replace( const charT* s, const basic_regex<charT, traits>& e, const basic_string<charT, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template < class traits, class charT> basic_string<charT> regex_replace( const charT* s, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default); // class template regex_iterator: template < class BidirectionalIterator, class charT = typename iterator_traits< BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_iterator; typedef regex_iterator< const char *> cregex_iterator; typedef regex_iterator< const wchar_t *> wcregex_iterator; typedef regex_iterator<string::const_iterator> sregex_iterator; typedef regex_iterator<wstring::const_iterator> wsregex_iterator; // class template regex_token_iterator: template < class BidirectionalIterator, class charT = typename iterator_traits< BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_token_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_iterator> scregex_token_iterator; typedef regex_token_iterator<wstring::const_iterator> wscregex_token_iterator; } // namespace std |
Namespace std::regex_constants
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | namespace regex_constants { typedef /*T1*/ syntax_option_type; static constexpr syntax_option_type icase = /*unspecified*/ ; static constexpr syntax_option_type nosubs = /*unspecified*/ ; static constexpr syntax_option_type optimize = /*unspecified*/ ; static constexpr syntax_option_type collate = /*unspecified*/ ; static constexpr syntax_option_type ECMAScript = /*unspecified*/ ; static constexpr syntax_option_type basic = /*unspecified*/ ; static constexpr syntax_option_type extended = /*unspecified*/ ; static constexpr syntax_option_type awk = /*unspecified*/ ; static constexpr syntax_option_type grep = /*unspecified*/ ; static constexpr syntax_option_type egrep = /*unspecified*/ ; typedef /*T2*/ match_flag_type; static constexpr match_flag_type match_default = 0; static constexpr match_flag_type match_not_bol = /*unspecified*/ ; static constexpr match_flag_type match_not_eol = /*unspecified*/ ; static constexpr match_flag_type match_not_bow = /*unspecified*/ ; static constexpr match_flag_type match_not_eow = /*unspecified*/ ; static constexpr match_flag_type match_any = /*unspecified*/ ; static constexpr match_flag_type match_not_null = /*unspecified*/ ; static constexpr match_flag_type match_continuous = /*unspecified*/ ; static constexpr match_flag_type match_prev_avail = /*unspecified*/ ; static constexpr match_flag_type format_default = 0; static constexpr match_flag_type format_sed = /*unspecified*/ ; static constexpr match_flag_type format_no_copy = /*unspecified*/ ; static constexpr match_flag_type format_first_only = /*unspecified*/ ; typedef /*T3*/ error_type; static constexpr error_type error_collate = /*unspecified*/ ; static constexpr error_type error_ctype = /*unspecified*/ ; static constexpr error_type error_escape = /*unspecified*/ ; static constexpr error_type error_backref = /*unspecified*/ ; static constexpr error_type error_brack = /*unspecified*/ ; static constexpr error_type error_paren = /*unspecified*/ ; static constexpr error_type error_brace = /*unspecified*/ ; static constexpr error_type error_badbrace = /*unspecified*/ ; static constexpr error_type error_range = /*unspecified*/ ; static constexpr error_type error_space = /*unspecified*/ ; static constexpr error_type error_badrepeat = /*unspecified*/ ; static constexpr error_type error_complexity = /*unspecified*/ ; static constexpr error_type error_stack = /*unspecified*/ ; } |
Class std::regex_error
1 2 3 4 5 | class regex_error : public std::runtime_error { public : explicit regex_error(regex_constants::error_type ecode); regex_constants::error_type code() const ; }; |
Class std::regex_traits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | template < class charT> struct regex_traits { public : typedef charT char_type; typedef std::basic_string<char_type> string_type; typedef std::locale locale_type; typedef /*bitmask_type*/ char_class_type; regex_traits(); static std:: size_t length( const char_type* p); charT translate(charT c) const ; charT translate_nocase(charT c) const ; template < class ForwardIterator> string_type transform(ForwardIterator first, ForwardIterator last) const ; template < class ForwardIterator> string_type transform_primary( ForwardIterator first, ForwardIterator last) const ; template < class ForwardIterator> string_type lookup_collatename( ForwardIterator first, ForwardIterator last) const ; template < class ForwardIterator> char_class_type lookup_classname( ForwardIterator first, ForwardIterator last, bool icase = false ) const ; bool isctype(charT c, char_class_type f) const ; int value(charT ch, int radix) const ; locale_type imbue(locale_type l); locale_type getloc() const ; }; |
Class std::regex
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | template < class charT, class traits = regex_traits<charT> > class basic_regex { public : // types: typedef charT value_type; typedef traits traits_type; typedef typename traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename traits::locale_type locale_type; // constants: static constexpr regex_constants::syntax_option_type icase = regex_constants::icase; static constexpr regex_constants::syntax_option_type nosubs = regex_constants::nosubs; static constexpr regex_constants::syntax_option_type optimize = regex_constants::optimize; static constexpr regex_constants::syntax_option_type collate = regex_constants::collate; static constexpr regex_constants::syntax_option_type ECMAScript = regex_constants::ECMAScript; static constexpr regex_constants::syntax_option_type basic = regex_constants::basic; static constexpr regex_constants::syntax_option_type extended = regex_constants::extended; static constexpr regex_constants::syntax_option_type awk = regex_constants::awk; static constexpr regex_constants::syntax_option_type grep = regex_constants::grep; static constexpr regex_constants::syntax_option_type egrep = regex_constants::egrep; //construct/copy/destroy: basic_regex(); explicit basic_regex( const charT* p, flag_type f = regex_constants::ECMAScript); basic_regex( const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); basic_regex( const basic_regex&); basic_regex(basic_regex&&) noexcept; template < class ST, class SA> explicit basic_regex( const basic_string<charT, ST, SA>& p, flag_type f = regex_constants::ECMAScript); template < class ForwardIterator> basic_regex(ForwardIterator first, ForwardIterator last, flag_type f = regex_constants::ECMAScript); basic_regex(initializer_list<charT>, flag_type = regex_constants::ECMAScript); ~basic_regex(); basic_regex& operator=( const basic_regex&); basic_regex& operator=(basic_regex&&) noexcept; basic_regex& operator=( const charT* ptr); basic_regex& operator=(initializer_list<charT> il); template < class ST, class SA> basic_regex& operator=( const basic_string<charT, ST, SA>& p); // assign: basic_regex& assign( const basic_regex& that); basic_regex& assign(basic_regex&& that) noexcept; basic_regex& assign( const charT* ptr, flag_type f = regex_constants::ECMAScript); basic_regex& assign( const charT* p, size_t len, flag_type f); template < class string_traits, class A> basic_regex& assign( const basic_string<charT, string_traits, A>& s, flag_type f = regex_constants::ECMAScript); template < class InputIterator> basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::ECMAScript); basic_regex& assign(initializer_list<charT>, flag_type = regex_constants::ECMAScript); // const operations: unsigned mark_count() const ; flag_type flags() const ; // locale: locale_type imbue(locale_type loc); locale_type getloc() const ; // swap: void swap(basic_regex&); }; |
Class std::sub_match
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | template < class BidirectionalIterator> class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator> { public : typedef typename iterator_traits<BidirectionalIterator>:: value_type value_type; typedef typename iterator_traits<BidirectionalIterator>:: difference_type difference_type; typedef BidirectionalIterator iterator; typedef basic_string<value_type> string_type; bool matched; constexpr sub_match(); difference_type length() const ; operator string_type() const ; string_type str() const ; int compare( const sub_match& s) const ; int compare( const string_type& s) const ; int compare( const value_type* s) const ; }; |
Class std::match_results
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | template < class BidirectionalIterator, class Allocator = allocator<sub_match<BidirectionalIterator> > class match_results { public : typedef sub_match<BidirectionalIterator> value_type; typedef const value_type& const_reference; typedef const_reference reference; typedef /*implementation-defined*/ const_iterator; typedef const_iterator iterator; typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef typename allocator_traits<Allocator>::size_type size_type; typedef Allocator allocator_type; typedef typename iterator_traits<BidirectionalIterator>::value_type char_type; typedef basic_string<char_type> string_type; // construct/copy/destroy: explicit match_results( const Allocator& a = Allocator()); match_results( const match_results& m); match_results(match_results&& m) noexcept; match_results& operator=( const match_results& m); match_results& operator=(match_results&& m); ~match_results(); // state: bool ready() const ; // size: size_type size() const ; size_type max_size() const ; bool empty() const ; // element access: difference_type length(size_type sub = 0) const ; difference_type position(size_type sub = 0) const ; string_type str(size_type sub = 0) const ; const_reference operator[](size_type n) const ; const_reference prefix() const ; const_reference suffix() const ; const_iterator begin() const ; const_iterator end() const ; const_iterator cbegin() const ; const_iterator cend() const ; // format: template < class OutputIter> OutputIter format(OutputIter out, const char_type* fmt_first, const char_type* fmt_last, regex_constants::match_flag_type flags = regex_constants::format_default) const ; template < class OutputIter, class ST, class SA> OutputIter format(OutputIter out, const basic_string<char_type, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const ; template < class ST, class SA> basic_string<char_type, ST, SA> format( const basic_string<char_type, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const ; string_type format( const char_type* fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const ; // allocator: allocator_type get_allocator() const ; // swap: void swap(match_results& that); }; |
Please login to continue.