libstdc++
Regular Expressions

Classes

Typedefs

Functions

Matching, Searching, and Replacing


Detailed Description

A facility for performing regular expression pattern matching.


Typedef Documentation

typedef regex_token_iterator<const char*> std::cregex_token_iterator

Token iterator for C-style NULL-terminated strings.

Definition at line 2504 of file regex.h.

typedef sub_match<const char*> std::csub_match

Standard regex submatch over a C-style null-terminated string.

Definition at line 850 of file regex.h.

typedef basic_regex<char> std::regex

Standard regular expressions.

Definition at line 723 of file regex.h.

typedef regex_token_iterator<string::const_iterator> std::sregex_token_iterator

Token iterator for standard strings.

Definition at line 2506 of file regex.h.

typedef sub_match<string::const_iterator> std::ssub_match

Standard regex submatch over a standard string.

Definition at line 852 of file regex.h.

typedef regex_token_iterator<const wchar_t*> std::wcregex_token_iterator

Token iterator for C-style NULL-terminated wide strings.

Definition at line 2509 of file regex.h.

typedef sub_match<const wchar_t*> std::wcsub_match

Regex submatch over a C-style null-terminated wide string.

Definition at line 855 of file regex.h.

typedef basic_regex<wchar_t> std::wregex

Standard wide-character regular expressions.

Definition at line 726 of file regex.h.

typedef regex_token_iterator<wstring::const_iterator> std::wsregex_token_iterator

Token iterator for standard wide-character strings.

Definition at line 2511 of file regex.h.

typedef sub_match<wstring::const_iterator> std::wssub_match

Regex submatch over a standard wide string.

Definition at line 857 of file regex.h.


Function Documentation

bool std::regex_traits::isctype ( _Ch_type  __c,
char_class_type  __f 
) const

Determines if c is a member of an identified class.

Parameters:
ca character.
fa class type (as returned from lookup_classname).
Returns:
true if the character c is a member of the classification represented by f, false otherwise.
Exceptions:
std::bad_castif the current locale does not have a ctype facet.

Definition at line 284 of file regex.h.

References std::use_facet(), std::__ctype_abstract_base::is(), and std::__ctype_abstract_base::widen().

template<typename _BiIter >
bool std::operator!= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the inequivalence of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 882 of file regex.h.

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator!= ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the inequivalence of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 958 of file regex.h.

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator!= ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the inequivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 1039 of file regex.h.

template<typename _Bi_iter >
bool std::operator!= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the inequivalence of an iterator value and a regular expression submatch.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 1123 of file regex.h.

template<typename _Bi_iter >
bool std::operator!= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the inequivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA pointer to a string.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 1197 of file regex.h.

template<typename _Bi_iter >
bool std::operator!= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the inequivalence of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 1274 of file regex.h.

template<typename _Bi_iter >
bool std::operator!= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the inequivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs is not equivalent to rhs, false otherwise.

Definition at line 1354 of file regex.h.

template<typename _Bi_iter , class _Allocator >
bool std::operator!= ( const match_results< _Bi_iter, _Allocator > &  __m1,
const match_results< _Bi_iter, _Allocator > &  __m2 
) [inline]

Compares two match_results for inequality.

Returns:
true if the two objects do not refer to the same match, false otherwise.

Definition at line 1868 of file regex.h.

template<typename _BiIter >
bool std::operator< ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the ordering of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 894 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator< ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 971 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc >
bool std::operator< ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 1053 of file regex.h.

References std::basic_string::compare().

template<typename _Bi_iter >
bool std::operator< ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 1135 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator< ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 1209 of file regex.h.

template<typename _Bi_iter >
bool std::operator< ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 1286 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator< ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs precedes rhs, false otherwise.

Definition at line 1366 of file regex.h.

template<typename _Ch_type , typename _Ch_traits , typename _Bi_iter >
basic_ostream<_Ch_type, _Ch_traits>& std::operator<< ( basic_ostream< _Ch_type, _Ch_traits > &  __os,
const sub_match< _Bi_iter > &  __m 
) [inline]

Inserts a matched string into an output stream.

Parameters:
osThe output stream.
mA submatch string.
Returns:
the output stream with the submatch string inserted.

Definition at line 1420 of file regex.h.

References std::sub_match::str().

template<typename _BiIter >
bool std::operator<= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the ordering of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 906 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator<= ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1010 of file regex.h.

template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc >
bool std::operator<= ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1095 of file regex.h.

template<typename _Bi_iter >
bool std::operator<= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1171 of file regex.h.

template<typename _Bi_iter >
bool std::operator<= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1245 of file regex.h.

template<typename _Bi_iter >
bool std::operator<= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1325 of file regex.h.

template<typename _Bi_iter >
bool std::operator<= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs does not succeed rhs, false otherwise.

Definition at line 1405 of file regex.h.

template<typename _BiIter >
bool std::operator== ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the equivalence of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 870 of file regex.h.

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator== ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the equivalence of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 943 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator== ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the equivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 1024 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator== ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the equivalence of a C string and a regular expression submatch.

Parameters:
lhsA C string.
rhsA regular expression submatch.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 1110 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator== ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the equivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA pointer to a string?
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 1184 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator== ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the equivalence of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 1258 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter >
bool std::operator== ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the equivalence of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs is equivalent to rhs, false otherwise.

Definition at line 1338 of file regex.h.

References std::sub_match::compare().

template<typename _Bi_iter , typename _Allocator >
bool std::operator== ( const match_results< _Bi_iter, _Allocator > &  __m1,
const match_results< _Bi_iter, _Allocator > &  __m2 
) [inline]

Compares two match_results for equality.

Returns:
true if the two objects refer to the same match, false otherwise.

Definition at line 1844 of file regex.h.

References std::equal().

template<typename _BiIter >
bool std::operator> ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the ordering of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 930 of file regex.h.

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator> ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 984 of file regex.h.

template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc >
bool std::operator> ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 1067 of file regex.h.

template<typename _Bi_iter >
bool std::operator> ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 1147 of file regex.h.

template<typename _Bi_iter >
bool std::operator> ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 1221 of file regex.h.

template<typename _Bi_iter >
bool std::operator> ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 1301 of file regex.h.

template<typename _Bi_iter >
bool std::operator> ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs succeeds rhs, false otherwise.

Definition at line 1381 of file regex.h.

template<typename _BiIter >
bool std::operator>= ( const sub_match< _BiIter > &  __lhs,
const sub_match< _BiIter > &  __rhs 
) [inline]

Tests the ordering of two regular expression submatches.

Parameters:
lhsFirst regular expression submatch.
rhsSecond regular expression submatch.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 918 of file regex.h.

template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool std::operator>= ( const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 997 of file regex.h.

template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc >
bool std::operator>= ( const sub_match< _Bi_iter > &  __lhs,
const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 1081 of file regex.h.

template<typename _Bi_iter >
bool std::operator>= ( typename iterator_traits< _Bi_iter >::value_type const *  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 1159 of file regex.h.

template<typename _Bi_iter >
bool std::operator>= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const *  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA string.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 1233 of file regex.h.

template<typename _Bi_iter >
bool std::operator>= ( typename iterator_traits< _Bi_iter >::value_type const &  __lhs,
const sub_match< _Bi_iter > &  __rhs 
) [inline]

Tests the ordering of a string and a regular expression submatch.

Parameters:
lhsA string.
rhsA regular expression submatch.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 1313 of file regex.h.

template<typename _Bi_iter >
bool std::operator>= ( const sub_match< _Bi_iter > &  __lhs,
typename iterator_traits< _Bi_iter >::value_type const &  __rhs 
) [inline]

Tests the ordering of a regular expression submatch and a string.

Parameters:
lhsA regular expression submatch.
rhsA const string reference.
Returns:
true if lhs does not precede rhs, false otherwise.

Definition at line 1393 of file regex.h.

template<typename _Bi_iter , typename _Allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_match ( _Bi_iter  __s,
_Bi_iter  __e,
match_results< _Bi_iter, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)

Determines if there is a match between the regular expression e and all of the character sequence [first, last).

Parameters:
sStart of the character sequence to match.
eOne-past-the-end of the character sequence to match.
mThe match results.
reThe regular expression.
flagsControls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.
Todo:
Implement this function.

Definition at line 1912 of file regex.h.

Referenced by std::regex_match().

template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool std::regex_match ( _Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
)

Indicates if there is a match between the regular expression e and all of the character sequence [first, last).

Parameters:
firstBeginning of the character sequence to match.
lastOne-past-the-end of the character sequence to match.
reThe regular expression.
flagsControls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.

Definition at line 1943 of file regex.h.

References std::regex_match().

template<typename _Ch_type , typename _Allocator , typename _Rx_traits >
bool std::regex_match ( const _Ch_type *  __s,
match_results< const _Ch_type *, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __f = regex_constants::match_default 
) [inline]

Determines if there is a match between the regular expression e and a C-style null-terminated string.

Parameters:
sThe C-style null-terminated string to match.
mThe match results.
reThe regular expression.
fControls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.

Definition at line 1968 of file regex.h.

References std::regex_match().

template<typename _Ch_traits , typename _Ch_alloc , typename _Allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_match ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &  __s,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]

Determines if there is a match between the regular expression e and a string.

Parameters:
sThe string to match.
mThe match results.
reThe regular expression.
flagsControls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.

Definition at line 1992 of file regex.h.

References std::regex_match(), std::basic_string::begin(), and std::basic_string::end().

template<typename _Ch_type , class _Rx_traits >
bool std::regex_match ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __f = regex_constants::match_default 
) [inline]

Indicates if there is a match between the regular expression e and a C-style null-terminated string.

Parameters:
sThe C-style null-terminated string to match.
reThe regular expression.
fControls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.

Definition at line 2015 of file regex.h.

References std::regex_match().

template<typename _Ch_traits , typename _Str_allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_match ( const basic_string< _Ch_type, _Ch_traits, _Str_allocator > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]

Indicates if there is a match between the regular expression e and a string.

Parameters:
s[IN] The string to match.
re[IN] The regular expression.
flags[IN] Controls how the regular expression is matched.
Return values:
trueA match exists.
falseOtherwise.
Exceptions:
anexception of type regex_error.

Definition at line 2037 of file regex.h.

References std::regex_match(), std::basic_string::begin(), and std::basic_string::end().

template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type >
_Out_iter std::regex_replace ( _Out_iter  __out,
_Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const basic_string< _Ch_type > &  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Parameters:
out
first
last
e
fmt
flags
Returns:
out
Exceptions:
anexception of type regex_error.
Todo:
Implement this function.

Definition at line 2196 of file regex.h.

Referenced by std::regex_replace().

template<typename _Rx_traits , typename _Ch_type >
basic_string<_Ch_type> std::regex_replace ( const basic_string< _Ch_type > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
const basic_string< _Ch_type > &  __fmt,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Parameters:
s
e
fmt
flags
Returns:
a copy of string s with replacements.
Exceptions:
anexception of type regex_error.

Definition at line 2216 of file regex.h.

References std::regex_replace(), std::back_inserter(), std::basic_string::begin(), and std::basic_string::end().

template<typename _Bi_iter , typename _Allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_search ( _Bi_iter  __first,
_Bi_iter  __last,
match_results< _Bi_iter, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]

Searches for a regular expression within a range.

Parameters:
first[IN] The start of the string to search.
last[IN] One-past-the-end of the string to search.
m[OUT] The match results.
re[IN] The regular expression to search for.
flags[IN] Search policy flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Exceptions:
anexception of type regex_error.
Todo:
Implement this function.

Definition at line 2062 of file regex.h.

Referenced by std::regex_search().

template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits >
bool std::regex_search ( _Bi_iter  __first,
_Bi_iter  __last,
const basic_regex< _Ch_type, _Rx_traits > &  __re,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]

Searches for a regular expression within a range.

Parameters:
first[IN] The start of the string to search.
last[IN] One-past-the-end of the string to search.
re[IN] The regular expression to search for.
flags[IN] Search policy flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string.
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Exceptions:
anexception of type regex_error.

Definition at line 2083 of file regex.h.

References std::regex_search().

template<typename _Ch_type , class _Allocator , class _Rx_traits >
bool std::regex_search ( const _Ch_type *  __s,
match_results< const _Ch_type *, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
) [inline]

Searches for a regular expression within a C-string.

Parameters:
s[IN] A C-string to search for the regex.
m[OUT] The set of regex matches.
e[IN] The regex to search for in s.
f[IN] The search flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Exceptions:
anexception of type regex_error.

Definition at line 2107 of file regex.h.

References std::regex_search().

template<typename _Ch_type , typename _Rx_traits >
bool std::regex_search ( const _Ch_type *  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
) [inline]

Searches for a regular expression within a C-string.

Parameters:
s[IN] The C-string to search.
e[IN] The regular expression to search for.
f[IN] Search policy flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string.
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Exceptions:
anexception of type regex_error.

Definition at line 2127 of file regex.h.

References std::regex_search().

template<typename _Ch_traits , typename _String_allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_search ( const basic_string< _Ch_type, _Ch_traits, _String_allocator > &  __s,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __flags = regex_constants::match_default 
) [inline]

Searches for a regular expression within a string.

Parameters:
s[IN] The string to search.
e[IN] The regular expression to search for.
flags[IN] Search policy flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string.
Todo:
Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html
Exceptions:
anexception of type regex_error.

Definition at line 2147 of file regex.h.

References std::regex_search().

template<typename _Ch_traits , typename _Ch_alloc , typename _Allocator , typename _Ch_type , typename _Rx_traits >
bool std::regex_search ( const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &  __s,
match_results< typename basic_string< _Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Allocator > &  __m,
const basic_regex< _Ch_type, _Rx_traits > &  __e,
regex_constants::match_flag_type  __f = regex_constants::match_default 
) [inline]

Searches for a regular expression within a string.

Parameters:
s[IN] A C++ string to search for the regex.
m[OUT] The set of regex matches.
e[IN] The regex to search for in s.
f[IN] The search flags.
Return values:
trueA match was found within the string.
falseNo match was found within the string, the content of m is undefined.
Exceptions:
anexception of type regex_error.

Definition at line 2170 of file regex.h.

References std::regex_search(), std::basic_string::begin(), and std::basic_string::end().

template<typename _Ch_type , typename _Rx_traits >
void std::swap ( basic_regex< _Ch_type, _Rx_traits > &  __lhs,
basic_regex< _Ch_type, _Rx_traits > &  __rhs 
) [inline]

Swaps the contents of two regular expression objects.

Parameters:
lhsFirst regular expression.
rhsSecond regular expression.

Definition at line 738 of file regex.h.

References std::basic_regex::swap().

template<typename _Bi_iter , typename _Allocator >
void std::swap ( match_results< _Bi_iter, _Allocator > &  __lhs,
match_results< _Bi_iter, _Allocator > &  __rhs 
) [inline]

Swaps two match results.

Parameters:
lhsA match result.
rhsA match result.

The contents of the two match_results objects are swapped.

Definition at line 1882 of file regex.h.

int std::regex_traits::value ( _Ch_type  __ch,
int  __radix 
) const

Converts a digit to an int.

Parameters:
cha character representing a digit.
radixthe radix if the numeric conversion (limited to 8, 10, or 16).
Returns:
the value represented by the digit ch in base radix if the character ch is a valid digit in base radix; otherwise returns -1.

Definition at line 320 of file regex.h.

References std::oct(), and std::hex().