.TH "std::basic_regex< _Ch_type, _Rx_traits >" 3cxx "Fri Dec 19 2014" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::basic_regex< _Ch_type, _Rx_traits > \- .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef .br \fBregex_constants::syntax_option_type\fP \fBflag_type\fP" .br .ti -1c .RI "typedef traits_type::locale_type \fBlocale_type\fP" .br .ti -1c .RI "typedef traits_type::string_type \fBstring_type\fP" .br .ti -1c .RI "typedef _Rx_traits \fBtraits_type\fP" .br .ti -1c .RI "typedef _Ch_type \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBbasic_regex\fP ()" .br .ti -1c .RI "\fBbasic_regex\fP (const _Ch_type *__p, flag_type __f=ECMAScript)" .br .ti -1c .RI "\fBbasic_regex\fP (const _Ch_type *__p, std::size_t __len, flag_type __f)" .br .ti -1c .RI "\fBbasic_regex\fP (const \fBbasic_regex\fP &__rhs)" .br .ti -1c .RI "\fBbasic_regex\fP (const \fBbasic_regex\fP &&__rhs) noexcept" .br .ti -1c .RI "template \fBbasic_regex\fP (const \fBstd::basic_string\fP< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=ECMAScript)" .br .ti -1c .RI "template \fBbasic_regex\fP (_InputIterator __first, _InputIterator __last, flag_type __f=ECMAScript)" .br .ti -1c .RI "\fBbasic_regex\fP (initializer_list< _Ch_type > __l, flag_type __f=ECMAScript)" .br .ti -1c .RI "\fB~basic_regex\fP ()" .br .ti -1c .RI "const \fB__detail::_AutomatonPtr\fP & \fB_M_get_automaton\fP () const " .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const \fBbasic_regex\fP &__rhs)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (\fBbasic_regex\fP &&__rhs) noexcept" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const _Ch_type *__p, flag_type __flags=ECMAScript)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const _Ch_type *__p, std::size_t __len, flag_type __flags)" .br .ti -1c .RI "template \fBbasic_regex\fP & \fBassign\fP (const \fBbasic_string\fP< _Ch_type, _Ch_typeraits, _Alloc > &__s, flag_type __flags=ECMAScript)" .br .ti -1c .RI "template \fBbasic_regex\fP & \fBassign\fP (_InputIterator __first, _InputIterator __last, flag_type __flags=ECMAScript)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (initializer_list< _Ch_type > __l, flag_type __flags=ECMAScript)" .br .ti -1c .RI "flag_type \fBflags\fP () const " .br .ti -1c .RI "locale_type \fBgetloc\fP () const " .br .ti -1c .RI "locale_type \fBimbue\fP (locale_type __loc)" .br .ti -1c .RI "unsigned int \fBmark_count\fP () const " .br .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (const \fBbasic_regex\fP &__rhs)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (\fBbasic_regex\fP &&__rhs) noexcept" .br .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (const _Ch_type *__p)" .br .ti -1c .RI "template \fBbasic_regex\fP & \fBoperator=\fP (const \fBbasic_string\fP< _Ch_type, _Ch_typeraits, _Alloc > &__s)" .br .ti -1c .RI "void \fBswap\fP (\fBbasic_regex\fP &__rhs)" .br .in -1c .SS "Static Public Attributes" .PP .RI "\fBConstants\fP" .br std [28\&.8\&.1](1) .PP .in +1c .in +1c .ti -1c .RI "static constexpr flag_type \fBicase\fP" .br .ti -1c .RI "static constexpr flag_type \fBnosubs\fP" .br .ti -1c .RI "static constexpr flag_type \fBoptimize\fP" .br .ti -1c .RI "static constexpr flag_type \fBcollate\fP" .br .ti -1c .RI "static constexpr flag_type \fBECMAScript\fP" .br .ti -1c .RI "static constexpr flag_type \fBbasic\fP" .br .ti -1c .RI "static constexpr flag_type \fBextended\fP" .br .ti -1c .RI "static constexpr flag_type \fBawk\fP" .br .ti -1c .RI "static constexpr flag_type \fBgrep\fP" .br .ti -1c .RI "static constexpr flag_type \fBegrep\fP" .br .in -1c .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fB__detail::_AutomatonPtr\fP \fB_M_automaton\fP" .br .ti -1c .RI "flag_type \fB_M_flags\fP" .br .ti -1c .RI "_Rx_traits \fB_M_traits\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template>class std::basic_regex< _Ch_type, _Rx_traits >" Objects of specializations of this class represent regular expressions constructed from sequences of character type \fC_Ch_type\fP\&. .PP Storage for the regular expression is allocated and deallocated as necessary by the member functions of this class\&. .PP Definition at line 335 of file regex\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP ()\fC [inline]\fP" Constructs a basic regular expression that does not match any character sequence\&. .PP Definition at line 367 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const _Ch_type *__p, flag_type__f = \fCECMAScript\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Constructs a basic regular expression from the sequence [__p, __p + char_traits<_Ch_type>::length(__p)) interpreted according to the flags in \fC__f\fP\&. .PP \fBParameters:\fP .RS 4 \fI__p\fP A pointer to the start of a C-style null-terminated string containing a regular expression\&. .br \fI__f\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC__p\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 385 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const _Ch_type *__p, std::size_t__len, flag_type__f)\fC [inline]\fP" .PP Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the flags in \fCf\fP\&. .PP \fBParameters:\fP .RS 4 \fI__p\fP A pointer to the start of a string containing a regular expression\&. .br \fI__len\fP The length of the string containing the regular expression\&. .br \fI__f\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC__p\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 403 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const \fBbasic_regex\fP< _Ch_type, _Rx_traits > &__rhs)\fC [inline]\fP" .PP Copy-constructs a basic regular expression\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP A \fCregex\fP object\&. .RE .PP .PP Definition at line 413 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const \fBbasic_regex\fP< _Ch_type, _Rx_traits > &&__rhs)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move-constructs a basic regular expression\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP A \fCregex\fP object\&. .RE .PP .PP Definition at line 423 of file regex\&.h\&. .SS "template> template \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const \fBstd::basic_string\fP< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type__f = \fCECMAScript\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Constructs a basic regular expression from the string \fCs\fP interpreted according to the flags in \fCf\fP\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP A string containing a regular expression\&. .br \fI__f\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC__s\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 439 of file regex\&.h\&. .SS "template> template \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (_InputIterator__first, _InputIterator__last, flag_type__f = \fCECMAScript\fP)\fC [inline]\fP" .PP Constructs a basic regular expression from the range [first, last) interpreted according to the flags in \fCf\fP\&. .PP \fBParameters:\fP .RS 4 \fI__first\fP The start of a range containing a valid regular expression\&. .br \fI__last\fP The end of a range containing a valid regular expression\&. .br \fI__f\fP The format flags of the regular expression\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC\fP[__first, __last) is not a valid regular expression\&. .RE .PP .PP Definition at line 461 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (initializer_list< _Ch_type >__l, flag_type__f = \fCECMAScript\fP)\fC [inline]\fP" .PP Constructs a basic regular expression from an initializer list\&. .PP \fBParameters:\fP .RS 4 \fI__l\fP The initializer list\&. .br \fI__f\fP The format flags of the regular expression\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC__l\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 475 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::~\fBbasic_regex\fP ()\fC [inline]\fP" .PP Destroys a basic regular expression\&. .PP Definition at line 485 of file regex\&.h\&. .SH "Member Function Documentation" .PP .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const \fBbasic_regex\fP< _Ch_type, _Rx_traits > &__rhs)\fC [inline]\fP" .PP the real assignment operator\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP Another regular expression object\&. .RE .PP .PP Definition at line 531 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::swap()\&. .PP Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::operator=()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (\fBbasic_regex\fP< _Ch_type, _Rx_traits > &&__rhs)\fC [inline]\fP, \fC [noexcept]\fP" .PP The move-assignment operator\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP Another regular expression object\&. .RE .PP .PP Definition at line 544 of file regex\&.h\&. .PP References std::move(), and std::basic_regex< _Ch_type, _Rx_traits >::swap()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const _Ch_type *__p, flag_type__flags = \fCECMAScript\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object from a C-style null-terminated string containing a regular expression pattern\&. .PP \fBParameters:\fP .RS 4 \fI__p\fP A pointer to a C-style null-terminated string containing a regular expression pattern\&. .br \fI__flags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if __p does not contain a valid regular expression pattern interpreted according to \fC__flags\fP\&. If regex_error is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 565 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const _Ch_type *__p, std::size_t__len, flag_type__flags)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object from a C-style string containing a regular expression pattern\&. .PP \fBParameters:\fP .RS 4 \fI__p\fP A pointer to a C-style string containing a regular expression pattern\&. .br \fI__len\fP The length of the regular expression pattern string\&. .br \fI__flags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if p does not contain a valid regular expression pattern interpreted according to \fC__flags\fP\&. If regex_error is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 582 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const \fBbasic_string\fP< _Ch_type, _Ch_typeraits, _Alloc > &__s, flag_type__flags = \fCECMAScript\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object from a string containing a regular expression pattern\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP A string containing a regular expression pattern\&. .br \fI__flags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if __s does not contain a valid regular expression pattern interpreted according to \fC__flags\fP\&. If regex_error is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 598 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::swap()\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (_InputIterator__first, _InputIterator__last, flag_type__flags = \fCECMAScript\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object\&. .PP \fBParameters:\fP .RS 4 \fI__first\fP The start of a range containing a valid regular expression\&. .br \fI__last\fP The end of a range containing a valid regular expression\&. .br \fI__flags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if p does not contain a valid regular expression pattern interpreted according to \fC__flags\fP\&. If regex_error is thrown, the object remains unchanged\&. .RE .PP .PP Definition at line 621 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (initializer_list< _Ch_type >__l, flag_type__flags = \fCECMAScript\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object\&. .PP \fBParameters:\fP .RS 4 \fI__l\fP An initializer list representing a regular expression\&. .br \fI__flags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fIregex_error\fP if \fC__l\fP does not contain a valid regular expression pattern interpreted according to \fC__flags\fP\&. If regex_error is thrown, the object remains unchanged\&. .RE .PP .PP Definition at line 637 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> flag_type \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::flags () const\fC [inline]\fP" .PP Gets the flags used to construct the regular expression or in the last call to assign()\&. .PP Definition at line 654 of file regex\&.h\&. .PP Referenced by std::basic_regex< _Ch_type, _Rx_traits >::operator=()\&. .SS "template> locale_type \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::getloc () const\fC [inline]\fP" .PP Gets the locale currently imbued in the regular expression object\&. .PP Definition at line 672 of file regex\&.h\&. .SS "template> locale_type \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::imbue (locale_type__loc)\fC [inline]\fP" .PP Imbues the regular expression object with the given locale\&. .PP \fBParameters:\fP .RS 4 \fI__loc\fP A locale\&. .RE .PP .PP Definition at line 664 of file regex\&.h\&. .SS "template> unsigned int \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::mark_count () const\fC [inline]\fP" .PP Gets the number of marked subexpressions within the regular expression\&. .PP Definition at line 646 of file regex\&.h\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (const \fBbasic_regex\fP< _Ch_type, _Rx_traits > &__rhs)\fC [inline]\fP" .PP Assigns one regular expression to another\&. .PP Definition at line 492 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (\fBbasic_regex\fP< _Ch_type, _Rx_traits > &&__rhs)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move-assigns one regular expression to another\&. .PP Definition at line 499 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::move()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (const _Ch_type *__p)\fC [inline]\fP" .PP Replaces a regular expression with a new one constructed from a C-style null-terminated string\&. .PP \fBParameters:\fP .RS 4 \fI__p\fP A pointer to the start of a null-terminated C-style string containing a regular expression\&. .RE .PP .PP Definition at line 510 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::flags()\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (const \fBbasic_string\fP< _Ch_type, _Ch_typeraits, _Alloc > &__s)\fC [inline]\fP" .PP Replaces a regular expression with a new one constructed from a string\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP A pointer to a string containing a regular expression\&. .RE .PP .PP Definition at line 521 of file regex\&.h\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::basic_regex< _Ch_type, _Rx_traits >::flags()\&. .SS "template> void \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::swap (\fBbasic_regex\fP< _Ch_type, _Rx_traits > &__rhs)\fC [inline]\fP" .PP Swaps the contents of two regular expression objects\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP Another regular expression object\&. .RE .PP .PP Definition at line 682 of file regex\&.h\&. .PP References std::swap()\&. .PP Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign(), and std::swap()\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.