.TH "std::basic_regex< _Ch_type, _Rx_traits >" 3cxx "Thu Aug 2 2012" "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 _Rx_traits::locale_type \fBlocale_type\fP" .br .ti -1c .RI "typedef _Rx_traits::string_type \fBstring_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 & \fBassign\fP (const \fBbasic_regex\fP &__that)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (const _Ch_type *__p, flag_type __flags=\fBregex_constants::ECMAScript\fP)" .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, _Allocator > &__s, flag_type __f=\fBregex_constants::ECMAScript\fP)" .br .ti -1c .RI "template \fBbasic_regex\fP & \fBassign\fP (_InputIterator __first, _InputIterator __last, flag_type __flags=\fBregex_constants::ECMAScript\fP)" .br .ti -1c .RI "\fBbasic_regex\fP & \fBassign\fP (\fBinitializer_list\fP< _Ch_type > __l, flag_type __f=\fBregex_constants::ECMAScript\fP)" .br .ti -1c .RI "\fBbasic_regex\fP ()" .br .ti -1c .RI "\fBbasic_regex\fP (const _Ch_type *__p, flag_type __f=\fBregex_constants::ECMAScript\fP)" .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 "template \fBbasic_regex\fP (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=\fBregex_constants::ECMAScript\fP)" .br .ti -1c .RI "template \fBbasic_regex\fP (_InputIterator __first, _InputIterator __last, flag_type __f=\fBregex_constants::ECMAScript\fP)" .br .ti -1c .RI "\fBbasic_regex\fP (\fBinitializer_list\fP< _Ch_type > __l, flag_type __f=\fBregex_constants::ECMAScript\fP)" .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 (const _Ch_type *__p)" .br .ti -1c .RI "template \fBbasic_regex\fP & \fBoperator=\fP (const \fBbasic_string\fP< _Ch_type, _Ch_typeraits, _Allocator > &__s)" .br .ti -1c .RI "void \fBswap\fP (\fBbasic_regex\fP &__rhs)" .br .ti -1c .RI "\fB~basic_regex\fP ()" .br .in -1c .SS "Static Public Attributes" .PP .RI "\fBConstants\fP" .br \fBtr1\fP [7\&.8\&.1] std [28\&.8\&.1] .PP .in +1c .in +1c .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBicase\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBnosubs\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBoptimize\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBcollate\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBECMAScript\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBbasic\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBextended\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBawk\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBgrep\fP" .br .ti -1c .RI "static const .br \fBregex_constants::syntax_option_type\fP \fBegrep\fP" .br .in -1c .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "flag_type \fB_M_flags\fP" .br .ti -1c .RI "unsigned int \fB_M_mark_count\fP" .br .ti -1c .RI "string_type \fB_M_pattern\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 709 of file tr1_impl/regex\&. .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 750 of file tr1_impl/regex\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const _Ch_type *__p, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\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 \fCf\fP\&. \fBParameters:\fP .RS 4 \fIp\fP A pointer to the start of a C-style null-terminated string containing a regular expression\&. .br \fIf\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fCp\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 766 of file tr1_impl/regex\&. .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\&. \fBParameters:\fP .RS 4 \fIp\fP A pointer to the start of a string containing a regular expression\&. .br \fIlen\fP The length of the string containing the regular expression\&. .br \fIf\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fCp\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 782 of file tr1_impl/regex\&. .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\&. \fBParameters:\fP .RS 4 \fIrhs\fP A \fCregex\fP object\&. .RE .PP .PP Definition at line 791 of file tr1_impl/regex\&. .SS "template> template \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (const \fBbasic_string\fP< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\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\&. \fBParameters:\fP .RS 4 \fIs\fP A string containing a regular expression\&. .br \fIf\fP Flags indicating the syntax rules and options\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fCs\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 807 of file tr1_impl/regex\&. .SS "template> template \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (_InputIterator__first, _InputIterator__last, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\fP)\fC [inline]\fP" .PP Constructs a basic regular expression from the range [first, last) interpreted according to the flags in \fCf\fP\&. \fBParameters:\fP .RS 4 \fIfirst\fP The start of a range containing a valid regular expression\&. .br \fIlast\fP The end of a range containing a valid regular expression\&. .br \fIf\fP The format flags of the regular expression\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fC\fP[first, last) is not a valid regular expression\&. .RE .PP .PP Definition at line 826 of file tr1_impl/regex\&. .SS "template> \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::\fBbasic_regex\fP (\fBinitializer_list\fP< _Ch_type >__l, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\fP)\fC [inline]\fP" .PP Constructs a basic regular expression from an initializer list\&. \fBParameters:\fP .RS 4 \fIl\fP The initializer list\&. .br \fIf\fP The format flags of the regular expression\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fCl\fP is not a valid regular expression\&. .RE .PP .PP Definition at line 840 of file tr1_impl/regex\&. .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 849 of file tr1_impl/regex\&. .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 > &__that)\fC [inline]\fP" .PP the real assignment operator\&. \fBParameters:\fP .RS 4 \fIthat\fP Another regular expression object\&. .RE .PP .PP Definition at line 888 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::swap()\&. .PP Referenced by std::basic_regex< _Ch_type, _Rx_traits >::operator=()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (const _Ch_type *__p, flag_type__flags = \fC\fBregex_constants::ECMAScript\fP\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\&. \fBParameters:\fP .RS 4 \fIp\fP A pointer to a C-style null-terminated string containing a regular expression pattern\&. .br \fIflags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if p does not contain a valid regular expression pattern interpreted according to \fCflags\fP\&. If \fBregex_error\fP is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 909 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .PP Referenced by 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\&. \fBParameters:\fP .RS 4 \fIp\fP A pointer to a C-style string containing a regular expression pattern\&. .br \fIlen\fP The length of the regular expression pattern string\&. .br \fIflags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if p does not contain a valid regular expression pattern interpreted according to \fCflags\fP\&. If \fBregex_error\fP is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 927 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .PP Referenced by 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, _Allocator > &__s, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object from a string containing a regular expression pattern\&. \fBParameters:\fP .RS 4 \fIs\fP A string containing a regular expression pattern\&. .br \fIflags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if p does not contain a valid regular expression pattern interpreted according to \fCflags\fP\&. If \fBregex_error\fP is thrown, *this remains unchanged\&. .RE .PP .PP Definition at line 943 of file tr1_impl/regex\&. .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 = \fC\fBregex_constants::ECMAScript\fP\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object\&. \fBParameters:\fP .RS 4 \fIfirst\fP The start of a range containing a valid regular expression\&. .br \fIlast\fP The end of a range containing a valid regular expression\&. .br \fIflags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if p does not contain a valid regular expression pattern interpreted according to \fCflags\fP\&. If \fBregex_error\fP is thrown, the object remains unchanged\&. .RE .PP .PP Definition at line 966 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .PP Referenced by std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .SS "template> \fBbasic_regex\fP& \fBstd::basic_regex\fP< _Ch_type, _Rx_traits >::assign (\fBinitializer_list\fP< _Ch_type >__l, flag_type__f = \fC\fBregex_constants::ECMAScript\fP\fP)\fC [inline]\fP" .PP Assigns a new regular expression to a regex object\&. \fBParameters:\fP .RS 4 \fIl\fP An initializer list representing a regular expression\&. .br \fIflags\fP Syntax option flags\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBregex_error\fP\fP if \fCl\fP does not contain a valid regular expression pattern interpreted according to \fCflags\fP\&. If \fBregex_error\fP is thrown, the object remains unchanged\&. .RE .PP .PP Definition at line 982 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .PP Referenced by 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 \fBassign()\fP\&. .PP Definition at line 1001 of file tr1_impl/regex\&. .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 1019 of file tr1_impl/regex\&. .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\&. \fBParameters:\fP .RS 4 \fIloc\fP A locale\&. .RE .PP .PP Definition at line 1011 of file tr1_impl/regex\&. .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 993 of file tr1_impl/regex\&. .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 856 of file tr1_impl/regex\&. .PP References std::basic_regex< _Ch_type, _Rx_traits >::assign()\&. .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\&. \fBParameters:\fP .RS 4 \fIA\fP pointer to the start of a null-terminated C-style string containing a regular expression\&. .RE .PP .PP Definition at line 867 of file tr1_impl/regex\&. .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, _Allocator > &__s)\fC [inline]\fP" .PP Replaces a regular expression with a new one constructed from a string\&. \fBParameters:\fP .RS 4 \fIA\fP pointer to a string containing a regular expression\&. .RE .PP .PP Definition at line 878 of file tr1_impl/regex\&. .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\&. \fBParameters:\fP .RS 4 \fIrhs\fP Another regular expression object\&. .RE .PP .PP Definition at line 1029 of file tr1_impl/regex\&. .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\&.