.TH "std::basic_regex< _Ch_type, _Rx_traits >" 3cxx "Tue Jul 2 2019" "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 \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, \fBflag_type\fP __f=ECMAScript)" .br .RI "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\&. " .ti -1c .RI "\fBbasic_regex\fP (const _Ch_type *__p, std::size_t __len, \fBflag_type\fP __f=ECMAScript)" .br .RI "Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the flags in \fCf\fP\&. " .ti -1c .RI "\fBbasic_regex\fP (const \fBbasic_regex\fP &__rhs)=default" .br .RI "Copy-constructs a basic regular expression\&. " .ti -1c .RI "\fBbasic_regex\fP (\fBbasic_regex\fP &&__rhs) noexcept=default" .br .RI "Move-constructs a basic regular expression\&. " .ti -1c .RI "template \fBbasic_regex\fP (const \fBstd::basic_string\fP< _Ch_type, _Ch_traits, _Ch_alloc > &__s, \fBflag_type\fP __f=ECMAScript)" .br .RI "Constructs a basic regular expression from the string \fCs\fP interpreted according to the flags in \fCf\fP\&. " .ti -1c .RI "template \fBbasic_regex\fP (_FwdIter __first, _FwdIter __last, \fBflag_type\fP __f=ECMAScript)" .br .RI "Constructs a basic regular expression from the range [first, last) interpreted according to the flags in \fCf\fP\&. " .ti -1c .RI "\fBbasic_regex\fP (\fBinitializer_list\fP< _Ch_type > __l, \fBflag_type\fP __f=ECMAScript)" .br .RI "Constructs a basic regular expression from an initializer list\&. " .ti -1c .RI "\fB~basic_regex\fP ()" .br .RI "Destroys a basic regular expression\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const \fBbasic_regex\fP &__rhs)" .br .RI "the real assignment operator\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (\fBbasic_regex\fP &&__rhs) noexcept" .br .RI "The move-assignment operator\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const _Ch_type *__p, \fBflag_type\fP __flags=ECMAScript)" .br .RI "Assigns a new regular expression to a regex object from a C-style null-terminated string containing a regular expression pattern\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const _Ch_type *__p, std::size_t __len, \fBflag_type\fP __flags)" .br .RI "Assigns a new regular expression to a regex object from a C-style string containing a regular expression pattern\&. " .ti -1c .RI "template \fBbasic_regex\fP & \fBassign\fP (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _Alloc > &__s, \fBflag_type\fP __flags=ECMAScript)" .br .RI "Assigns a new regular expression to a regex object from a string containing a regular expression pattern\&. " .ti -1c .RI "template \fBbasic_regex\fP & \fBassign\fP (_InputIterator __first, _InputIterator __last, \fBflag_type\fP __flags=ECMAScript)" .br .RI "Assigns a new regular expression to a regex object\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (\fBinitializer_list\fP< _Ch_type > __l, \fBflag_type\fP __flags=ECMAScript)" .br .RI "Assigns a new regular expression to a regex object\&. " .ti -1c .RI "\fBflag_type\fP \fBflags\fP () const" .br .RI "Gets the flags used to construct the regular expression or in the last call to assign()\&. " .ti -1c .RI "locale_type \fBgetloc\fP () const" .br .RI "Gets the locale currently imbued in the regular expression object\&. " .ti -1c .RI "locale_type \fBimbue\fP (locale_type __loc)" .br .RI "Imbues the regular expression object with the given locale\&. " .ti -1c .RI "unsigned int \fBmark_count\fP () const" .br .RI "Gets the number of marked subexpressions within the regular expression\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (const \fBbasic_regex\fP &__rhs)" .br .RI "Assigns one regular expression to another\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (\fBbasic_regex\fP &&__rhs) noexcept" .br .RI "Move-assigns one regular expression to another\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (const _Ch_type *__p)" .br .RI "Replaces a regular expression with a new one constructed from a C-style null-terminated string\&. " .ti -1c .RI "\fBbasic_regex\fP & \fBoperator=\fP (\fBinitializer_list\fP< _Ch_type > __l)" .br .RI "Replaces a regular expression with a new one constructed from an initializer list\&. " .ti -1c .RI "template \fBbasic_regex\fP & \fBoperator=\fP (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _Alloc > &__s)" .br .RI "Replaces a regular expression with a new one constructed from a string\&. " .ti -1c .RI "void \fBswap\fP (\fBbasic_regex\fP &__rhs)" .br .RI "Swaps the contents of two regular expression objects\&. " .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 \fBflag_type\fP \fBicase\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBnosubs\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBoptimize\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBcollate\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBECMAScript\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBbasic\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBextended\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBawk\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBgrep\fP" .br .ti -1c .RI "static constexpr \fBflag_type\fP \fBegrep\fP" .br .in -1c .in -1c .SS "Friends" .in +1c .ti -1c .RI "template bool \fB__detail::__regex_algo_impl\fP (_Bp, _Bp, \fBmatch_results\fP< _Bp, _Ap > &, const \fBbasic_regex\fP< _Cp, _Rp > &, \fBregex_constants::match_flag_type\fP)" .br .ti -1c .RI "template class \fB__detail::_Executor\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template> .br 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 36 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 422 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const _Ch_type * __p, \fBflag_type\fP __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 438 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, \fBflag_type\fP __f = \fCECMAScript\fP)\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 454 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 [default]\fP" .PP Copy-constructs a basic regular expression\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP A \fCregex\fP object\&. .RE .PP .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (\fBbasic_regex\fP< _Ch_type, _Rx_traits > && __rhs)\fC [default]\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 .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, \fBflag_type\fP __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 484 of file regex\&.h\&. .SS "template> template \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (_FwdIter __first, _FwdIter __last, \fBflag_type\fP __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 504 of file regex\&.h\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (\fBinitializer_list\fP< _Ch_type > __l, \fBflag_type\fP __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 517 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 524 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 582 of file regex\&.h\&. .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 595 of file regex\&.h\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const _Ch_type * __p, \fBflag_type\fP __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 616 of file regex\&.h\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const _Ch_type * __p, std::size_t __len, \fBflag_type\fP __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 633 of file regex\&.h\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _Alloc > & __s, \fBflag_type\fP __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 649 of file regex\&.h\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size()\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (_InputIterator __first, _InputIterator __last, \fBflag_type\fP __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 671 of file regex\&.h\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (\fBinitializer_list\fP< _Ch_type > __l, \fBflag_type\fP __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 687 of file regex\&.h\&. .SS "template> \fBflag_type\fP \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 708 of file regex\&.h\&. .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 730 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 718 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 696 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 531 of file regex\&.h\&. .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 538 of file regex\&.h\&. .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 549 of file regex\&.h\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (\fBinitializer_list\fP< _Ch_type > __l)\fC [inline]\fP" .PP Replaces a regular expression with a new one constructed from an initializer list\&. .PP \fBParameters:\fP .RS 4 \fI__l\fP The initializer list\&. .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 561 of file regex\&.h\&. .SS "template> template \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::operator= (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _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 572 of file regex\&.h\&. .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 740 of file regex\&.h\&. .PP Referenced by std::swap()\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.