35 _GLIBCXX_BEGIN_NAMESPACE_TR1
46 namespace regex_constants
431 template<
typename _Ch_type>
435 typedef _Ch_type char_type;
438 typedef std::ctype_base::mask char_class_type;
459 {
return string_type::traits_type::length(__p); }
486 return use_facet<ctype<char_type> >(_M_locale).
tolower(__c);
509 template<
typename _Fwd_iter>
535 template<
typename _Fwd_iter>
552 template<
typename _Fwd_iter>
589 template<
typename _Fwd_iter>
606 isctype(_Ch_type __c, char_class_type __f)
const;
619 value(_Ch_type __ch,
int __radix)
const;
635 std::swap(_M_locale, __loc);
645 {
return _M_locale; }
648 locale_type _M_locale;
651 template<
typename _Ch_type>
653 isctype(_Ch_type __c, char_class_type __f)
const
660 if (__ctype.
is(__c, __f))
664 if (__c == __ctype.
widen(
'_'))
666 const char*
const __wb[] =
"w";
667 char_class_type __wt = this->lookup_classname(__wb,
668 __wb +
sizeof(__wb));
674 if (__c == __ctype.isspace(__c))
676 const char*
const __bb[] =
"blank";
677 char_class_type __bt = this->lookup_classname(__bb,
678 __bb +
sizeof(__bb));
686 template<
typename _Ch_type>
688 value(_Ch_type __ch,
int __radix)
const
694 else if (__radix == 16)
708 template<
typename _Ch_type,
typename _Rx_traits = regex_traits<_Ch_type> >
713 typedef _Ch_type value_type;
715 typedef typename _Rx_traits::locale_type locale_type;
716 typedef typename _Rx_traits::string_type string_type;
751 : _M_flags(regex_constants::ECMAScript), _M_pattern(), _M_mark_count(0)
768 : _M_flags(__f), _M_pattern(__p), _M_mark_count(0)
782 basic_regex(
const _Ch_type* __p, std::size_t __len, flag_type __f)
783 : _M_flags(__f) , _M_pattern(__p, __len), _M_mark_count(0)
792 : _M_flags(__rhs._M_flags), _M_pattern(__rhs._M_pattern),
793 _M_mark_count(__rhs._M_mark_count)
805 template<
typename _Ch_traits,
typename _Ch_alloc>
809 : _M_flags(__f), _M_pattern(__s.begin(), __s.end()), _M_mark_count(0)
825 template<
typename _InputIterator>
828 : _M_flags(__f), _M_pattern(__first, __last), _M_mark_count(0)
831 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
842 : _M_flags(__f), _M_pattern(__l.begin(), __l.end()), _M_mark_count(0)
857 {
return this->
assign(__rhs); }
876 template<
typename _Ch_typeraits,
typename _Allocator>
911 {
return this->
assign(string_type(__p), __flags); }
927 assign(
const _Ch_type* __p, std::size_t __len, flag_type __flags)
928 {
return this->
assign(string_type(__p, __len), __flags); }
941 template<
typename _Ch_typeraits,
typename _Allocator>
964 template<
typename _InputIterator>
966 assign(_InputIterator __first, _InputIterator __last,
968 {
return this->
assign(string_type(__first, __last), __flags); }
970 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
984 {
return this->
assign(__l.begin(), __l.end(), __f); }
994 {
return _M_mark_count; }
1002 {
return _M_flags; }
1012 {
return _M_traits.imbue(__loc); }
1020 {
return _M_traits.getloc(); }
1031 std::swap(_M_flags, __rhs._M_flags);
1032 std::swap(_M_pattern, __rhs._M_pattern);
1033 std::swap(_M_mark_count, __rhs._M_mark_count);
1034 std::swap(_M_traits, __rhs._M_traits);
1046 string_type _M_pattern;
1047 unsigned int _M_mark_count;
1048 _Rx_traits _M_traits;
1053 #ifdef _GLIBCXX_USE_WCHAR_T
1065 template<
typename _Ch_type,
typename _Rx_traits>
1069 { __lhs.
swap(__rhs); }
1085 template<
typename _BiIter>
1089 typedef typename iterator_traits<_BiIter>::value_type value_type;
1090 typedef typename iterator_traits<_BiIter>::difference_type
1092 typedef _BiIter iterator;
1116 return this->matched
1129 return this->matched
1145 {
return this->
str().compare(__s.
str()); }
1158 {
return this->
str().compare(__s); }
1171 {
return this->
str().compare(__s); }
1179 #ifdef _GLIBCXX_USE_WCHAR_T
1194 template<
typename _BiIter>
1198 {
return __lhs.
compare(__rhs) == 0; }
1206 template<
typename _BiIter>
1210 {
return __lhs.
compare(__rhs) != 0; }
1218 template<
typename _BiIter>
1220 operator<(const sub_match<_BiIter>& __lhs,
1222 {
return __lhs.
compare(__rhs) < 0; }
1230 template<
typename _BiIter>
1232 operator<=(const sub_match<_BiIter>& __lhs,
1234 {
return __lhs.
compare(__rhs) <= 0; }
1242 template<
typename _BiIter>
1246 {
return __lhs.
compare(__rhs) >= 0; }
1254 template<
typename _BiIter>
1258 {
return __lhs.
compare(__rhs) > 0; }
1267 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1270 typename iterator_traits<_Bi_iter>::value_type,
1271 _Ch_traits, _Ch_alloc>& __lhs,
1273 {
return __lhs == __rhs.
str(); }
1282 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1285 typename iterator_traits<_Bi_iter>::value_type,
1287 {
return __lhs != __rhs.
str(); }
1295 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1298 typename iterator_traits<_Bi_iter>::value_type,
1300 {
return __lhs < __rhs.
str(); }
1308 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1311 typename iterator_traits<_Bi_iter>::value_type,
1313 {
return __lhs > __rhs.
str(); }
1321 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1324 typename iterator_traits<_Bi_iter>::value_type,
1326 {
return __lhs >= __rhs.
str(); }
1334 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1337 typename iterator_traits<_Bi_iter>::value_type,
1339 {
return __lhs <= __rhs.
str(); }
1348 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1352 typename iterator_traits<_Bi_iter>::value_type,
1353 _Ch_traits, _Ch_alloc>& __rhs)
1354 {
return __lhs.
str() == __rhs; }
1363 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1367 typename iterator_traits<_Bi_iter>::value_type,
1368 _Ch_traits, _Ch_alloc>& __rhs)
1369 {
return __lhs.
str() != __rhs; }
1377 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1379 operator<(const sub_match<_Bi_iter>& __lhs,
1381 typename iterator_traits<_Bi_iter>::value_type,
1382 _Ch_traits, _Ch_alloc>& __rhs)
1383 {
return __lhs.str() < __rhs; }
1391 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1395 typename iterator_traits<_Bi_iter>::value_type,
1396 _Ch_traits, _Ch_alloc>& __rhs)
1397 {
return __lhs.
str() > __rhs; }
1405 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1409 typename iterator_traits<_Bi_iter>::value_type,
1410 _Ch_traits, _Ch_alloc>& __rhs)
1411 {
return __lhs.
str() >= __rhs; }
1419 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1421 operator<=(const sub_match<_Bi_iter>& __lhs,
1423 typename iterator_traits<_Bi_iter>::value_type,
1424 _Ch_traits, _Ch_alloc>& __rhs)
1425 {
return __lhs.str() <= __rhs; }
1434 template<
typename _Bi_iter>
1436 operator==(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1438 {
return __lhs == __rhs.
str(); }
1447 template<
typename _Bi_iter>
1449 operator!=(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1451 {
return __lhs != __rhs.
str(); }
1459 template<
typename _Bi_iter>
1461 operator<(typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1463 {
return __lhs < __rhs.
str(); }
1471 template<
typename _Bi_iter>
1473 operator>(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1475 {
return __lhs > __rhs.
str(); }
1483 template<
typename _Bi_iter>
1485 operator>=(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1487 {
return __lhs >= __rhs.
str(); }
1495 template<
typename _Bi_iter>
1497 operator<=(typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1499 {
return __lhs <= __rhs.
str(); }
1508 template<
typename _Bi_iter>
1511 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1512 {
return __lhs.
str() == __rhs; }
1521 template<
typename _Bi_iter>
1524 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1525 {
return __lhs.
str() != __rhs; }
1533 template<
typename _Bi_iter>
1535 operator<(const sub_match<_Bi_iter>& __lhs,
1536 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1537 {
return __lhs.str() < __rhs; }
1545 template<
typename _Bi_iter>
1548 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1549 {
return __lhs.
str() > __rhs; }
1557 template<
typename _Bi_iter>
1560 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1561 {
return __lhs.
str() >= __rhs; }
1569 template<
typename _Bi_iter>
1571 operator<=(const sub_match<_Bi_iter>& __lhs,
1572 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1573 {
return __lhs.str() <= __rhs; }
1582 template<
typename _Bi_iter>
1584 operator==(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1586 {
return __lhs == __rhs.
str(); }
1595 template<
typename _Bi_iter>
1597 operator!=(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1599 {
return __lhs != __rhs.
str(); }
1607 template<
typename _Bi_iter>
1609 operator<(typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1611 {
return __lhs < __rhs.
str(); }
1619 template<
typename _Bi_iter>
1621 operator>(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1623 {
return __lhs > __rhs.
str(); }
1631 template<
typename _Bi_iter>
1633 operator>=(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1635 {
return __lhs >= __rhs.
str(); }
1643 template<
typename _Bi_iter>
1645 operator<=(typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1647 {
return __lhs <= __rhs.
str(); }
1656 template<
typename _Bi_iter>
1659 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1660 {
return __lhs.
str() == __rhs; }
1669 template<
typename _Bi_iter>
1672 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1673 {
return __lhs.
str() != __rhs; }
1681 template<
typename _Bi_iter>
1683 operator<(const sub_match<_Bi_iter>& __lhs,
1684 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1685 {
return __lhs.str() < __rhs; }
1693 template<
typename _Bi_iter>
1696 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1697 {
return __lhs.
str() > __rhs; }
1705 template<
typename _Bi_iter>
1708 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1709 {
return __lhs.
str() >= __rhs; }
1717 template<
typename _Bi_iter>
1719 operator<=(const sub_match<_Bi_iter>& __lhs,
1720 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1721 {
return __lhs.str() <= __rhs; }
1731 template<
typename _Ch_type,
typename _Ch_traits,
typename _Bi_iter>
1733 basic_ostream<_Ch_type, _Ch_traits>&
1734 operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
1736 {
return __os << __m.
str(); }
1761 template<
typename _Bi_iter,
1762 typename _Allocator = allocator<sub_match<_Bi_iter> > >
1764 :
private std::vector<std::_GLIBCXX_TR1 sub_match<_Bi_iter>, _Allocator>
1776 typedef typename _Allocator::const_reference const_reference;
1777 typedef const_reference reference;
1778 typedef typename _Base_type::const_iterator const_iterator;
1779 typedef const_iterator iterator;
1780 typedef typename iterator_traits<_Bi_iter>::difference_type
1782 typedef typename _Allocator::size_type size_type;
1783 typedef _Allocator allocator_type;
1784 typedef typename iterator_traits<_Bi_iter>::value_type char_type;
1807 :
_Base_type(__rhs), _M_matched(__rhs._M_matched),
1808 _M_prefix(__rhs._M_prefix), _M_suffix(__rhs._M_suffix)
1859 {
return size() == 0; }
1877 {
return _M_matched ? this->
str(__sub).
length() : 0; }
1893 (*
this)[__sub].first) : 0;
1904 str(size_type __sub = 0)
const
1905 {
return _M_matched ? (*this)[__sub].str() :
string_type(); }
1930 {
return _M_prefix; }
1941 {
return _M_suffix; }
1950 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
1966 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
1990 template<
typename _Out_iter>
1992 format(_Out_iter __out,
const string_type& __fmt,
2000 format(
const string_type& __fmt,
2016 using _Base_type::get_allocator;
2032 std::swap(_M_matched, __that._M_matched);
2033 std::swap(_M_prefix, __that._M_prefix);
2034 std::swap(_M_suffix, __that._M_suffix);
2040 value_type _M_prefix;
2041 value_type _M_suffix;
2044 typedef match_results<const char*> cmatch;
2045 typedef match_results<string::const_iterator> smatch;
2046 #ifdef _GLIBCXX_USE_WCHAR_T
2047 typedef match_results<const wchar_t*> wcmatch;
2048 typedef match_results<wstring::const_iterator> wsmatch;
2058 template<
typename _Bi_iter,
typename _Allocator>
2060 operator==(
const match_results<_Bi_iter, _Allocator>& __m1,
2061 const match_results<_Bi_iter, _Allocator>& __m2);
2068 template<
typename _Bi_iter,
class _Allocator>
2072 {
return !(__m1 == __m2); }
2082 template<
typename _Bi_iter,
typename _Allocator>
2086 { __lhs.
swap(__rhs); }
2111 template<
typename _Bi_iter,
typename _Allocator,
2112 typename _Ch_type,
typename _Rx_traits>
2115 match_results<_Bi_iter, _Allocator>& __m,
2116 const basic_regex<_Ch_type, _Rx_traits>& __re,
2134 template<
typename _Bi_iter,
typename _Ch_type,
typename _Rx_traits>
2142 return regex_match(__first, __last, __what, __re, __flags);
2159 template<
typename _Ch_type,
typename _Allocator,
typename _Rx_traits>
2166 {
return regex_match(__s, __s + _Rx_traits::length(__s), __m, __re, __f); }
2182 template<
typename _Ch_traits,
typename _Ch_alloc,
2183 typename _Allocator,
typename _Ch_type,
typename _Rx_traits>
2187 _Ch_traits, _Ch_alloc>::const_iterator, _Allocator>& __m,
2206 template<
typename _Ch_type,
class _Rx_traits>
2212 {
return regex_match(__s, __s + _Rx_traits::length(__s), __re, __f); }
2227 template<
typename _Ch_traits,
typename _Str_allocator,
2228 typename _Ch_type,
typename _Rx_traits>
2252 template<
typename _Bi_iter,
typename _Allocator,
2253 typename _Ch_type,
typename _Rx_traits>
2256 match_results<_Bi_iter, _Allocator>& __m,
2257 const basic_regex<_Ch_type, _Rx_traits>& __re,
2273 template<
typename _Bi_iter,
typename _Ch_type,
typename _Rx_traits>
2281 return regex_search(__first, __last, __what, __re, __flags);
2297 template<
typename _Ch_type,
class _Allocator,
class _Rx_traits>
2304 {
return regex_search(__s, __s + _Rx_traits::length(__s), __m, __e, __f); }
2317 template<
typename _Ch_type,
typename _Rx_traits>
2323 {
return regex_search(__s, __s + _Rx_traits::length(__s), __e, __f); }
2336 template<
typename _Ch_traits,
typename _String_allocator,
2337 typename _Ch_type,
typename _Rx_traits>
2340 _String_allocator>& __s,
2344 {
return regex_search(__s.begin(), __s.end(), __e, __flags); }
2358 template<
typename _Ch_traits,
typename _Ch_alloc,
2359 typename _Allocator,
typename _Ch_type,
2360 typename _Rx_traits>
2364 _Ch_traits, _Ch_alloc>::const_iterator, _Allocator>& __m,
2385 template<
typename _Out_iter,
typename _Bi_iter,
2386 typename _Rx_traits,
typename _Ch_type>
2388 regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
2389 const basic_regex<_Ch_type, _Rx_traits>& __e,
2390 const basic_string<_Ch_type>& __fmt,
2405 template<
typename _Rx_traits,
typename _Ch_type>
2406 inline basic_string<_Ch_type>
2415 __s.
begin(), __s.
end(), __e, __fmt, __flags);
2426 template<
typename _Bi_iter,
2427 typename _Ch_type =
typename iterator_traits<_Bi_iter>::value_type,
2428 typename _Rx_traits = regex_traits<_Ch_type> >
2434 typedef std::ptrdiff_t difference_type;
2528 #ifdef _GLIBCXX_USE_WCHAR_T
2541 template<
typename _Bi_iter,
2542 typename _Ch_type =
typename iterator_traits<_Bi_iter>::value_type,
2549 typedef std::ptrdiff_t difference_type;
2620 template<std::
size_t _Nm>
2623 const int (&__submatches)[_Nm],
2639 regex_token_iterator&
2640 operator=(
const regex_token_iterator& __rhs);
2647 operator==(
const regex_token_iterator& __rhs);
2654 operator!=(
const regex_token_iterator& __rhs);
2674 regex_token_iterator&
2681 regex_token_iterator
2687 position_iterator __position;
2698 #ifdef _GLIBCXX_USE_WCHAR_T
2707 _GLIBCXX_END_NAMESPACE_TR1
bool operator!=(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return false if x is equal to y.
bool operator==(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return true if x is equal to y.
basic_regex & operator=(const basic_string< _Ch_type, _Ch_typeraits, _Allocator > &__s)
Replaces a regular expression with a new one constructed from a string.
string_type lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const
Gets a collation element by name.
__match_flag
This is a bitmask type indicating regex matching rules.
iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
static const error_type error_range(_S_error_range)
bool regex_match(_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)
Determines if there is a match between the regular expression e and all of the character sequence [fi...
Controlling input for std::string.This class supports reading from objects of type std::basic_string...
void swap(match_results &__that)
Swaps the contents of two match_results.
reference operator[](size_type __n)
Subscript access to the data contained in the vector.
~match_results()
Destroys a match_results object.
static const syntax_option_type egrep
const value_type & operator*()
match_results & operator=(const match_results &__rhs)
Assigns rhs to *this.
pair holds two objects of arbitrary type.
A regular expression exception class.The regular expression library throws objects of this class on e...
static const error_type error_badrepeat(_S_error_badrepeat)
bool isctype(_Ch_type __c, char_class_type __f) const
Determines if c is a member of an identified class.
regex_constants::error_type code() const
Gets the regex error code.
static const syntax_option_type icase
basic_regex< char > regex
Standard regular expressions.
basic_regex(const _Ch_type *__p, std::size_t __len, flag_type __f)
Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the fla...
sub_match< const wchar_t * > wcsub_match
Regex submatch over a C-style null-terminated wide string.
locale_type getloc() const
Gets a copy of the current locale in use by the regex_traits object.
char_class_type lookup_classname(_Fwd_iter __first, _Fwd_iter __last) const
Maps one or more characters to a named character classification.
basic_regex & operator=(const _Ch_type *__p)
Replaces a regular expression with a new one constructed from a C-style null-terminated string...
const value_type * operator->()
Selects a regex_token_iterator member.
Describes aspects of a regular expression.
static const error_type error_complexity(_S_error_complexity)
regex_iterator & operator=(const regex_iterator &__rhs)
static const error_type error_escape(_S_error_escape)
int compare(const basic_string< value_type > &__s) const
Compares this sub_match to a string.
regex_traits()
Constructs a default traits object.
basic_regex & assign(const basic_regex &__that)
the real assignment operator.
static const syntax_option_type nosubs
bool operator==(const regex_token_iterator &__rhs)
Compares a regex_token_iterator to another for equality.
sub_match< wstring::const_iterator > wssub_match
Regex submatch over a standard wide string.
sub_match< string::const_iterator > ssub_match
Standard regex submatch over a standard string.
void swap(basic_regex &__rhs)
Swaps the contents of two regular expression objects.
_Out_iter 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)
size_type length() const
Returns the number of characters in the string, not including any null-termination.
unsigned int mark_count() const
Gets the number of marked subexpressions within the regular expression.
static const match_flag_type match_any
regex_token_iterator< wstring::const_iterator > wsregex_token_iterator
Token iterator for standard wide-character strings.
_BiIter second
second is a copy of the second object
ios_base & hex(ios_base &__base)
Calls base.setf(ios_base::hex, ios_base::basefield).
const_iterator cend() const
Gets an iterator to one-past-the-end of the collection.
const_reference operator[](size_type __sub) const
Gets a sub_match reference for the match or submatch.
static const match_flag_type format_first_only
string_type str(size_type __sub=0) const
Gets the match or submatch converted to a string type.
basic_string< value_type > str() const
Gets the matching sequence as a string.
static const match_flag_type match_default
static const match_flag_type match_continuous
static const match_flag_type format_no_copy
static const match_flag_type match_not_eol
int compare(const value_type *__s) const
Compares this sub_match to a C-style string.
const _CharT * data() const
Return const pointer to contents.
static std::size_t length(const char_type *__p)
Gives the length of a C-style string starting at __p.
static const error_type error_space(_S_error_space)
bool operator!=(const regex_token_iterator &__rhs)
Compares a regex_token_iterator to another for inequality.
char_type translate_nocase(char_type __c) const
Translates a character into a case-insensitive equivalent.
const_iterator end() const
Gets an iterator to one-past-the-end of the collection.
A standard container which offers fixed time access to individual elements in any order...
size_type size() const
Gets the number of matches and submatches.
basic_regex & assign(const _Ch_type *__p, flag_type __flags=regex_constants::ECMAScript)
Assigns a new regular expression to a regex object from a C-style null-terminated string containing a...
static const syntax_option_type awk
regex_token_iterator()
Default constructs a regex_token_iterator.
static const error_type error_badbrace(_S_error_badbrace)
locale_type getloc() const
Gets the locale currently imbued in the regular expression object.
static const syntax_option_type optimize
regex_iterator & operator++()
The results of a match or search operation.
static const error_type error_backref(_S_error_backref)
const_reference suffix() const
Gets a sub_match representing the match suffix.
regex_token_iterator & operator++()
Increments a regex_token_iterator.
_BiIter first
first is a copy of the first object
regex_token_iterator< const char * > cregex_token_iterator
Token iterator for C-style NULL-terminated strings.
regex_iterator()
Provides a singular iterator, useful for indicating one-past-the-end of a range.
size_type size() const
Returns the number of characters in the string, not including any null-termination.
match_results(const match_results &__rhs)
Copy constructs a match_results.
static const error_type error_stack(_S_error_stack)
const_iterator cbegin() const
Gets an iterator to the start of the sub_match collection.
size_type max_size() const
basic_regex(initializer_list< _Ch_type > __l, flag_type __f=regex_constants::ECMAScript)
Constructs a basic regular expression from an initializer list.
bool is(mask __m, char_type __c) const
Test char_type classification.
locale_type imbue(locale_type __loc)
Imbues the regular expression object with the given locale.
char_type widen(char __c) const
Widen char to char_type.
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
difference_type position(size_type __sub=0) const
Gets the offset of the beginning of the indicated submatch.
bool operator==(const regex_iterator &__rhs)
const value_type * operator->()
const_iterator begin() const
Gets an iterator to the start of the sub_match collection.
unsigned int syntax_option_type
This is a bitmask type indicating how to interpret the regex.
const _Facet & use_facet(const locale &__loc)
Return a facet.
std::bitset< _S_match_flag_last > match_flag_type
This is a bitmask type indicating regex matching rules.
const_reference prefix() const
Gets a sub_match representing the match prefix.
basic_regex & operator=(const basic_regex &__rhs)
Assigns one regular expression to another.
static const match_flag_type match_prev_avail
string_type transform_primary(_Fwd_iter __first, _Fwd_iter __last) const
Dunno.
basic_regex(const basic_regex &__rhs)
Copy-constructs a basic regular expression.
basic_regex(_InputIterator __first, _InputIterator __last, flag_type __f=regex_constants::ECMAScript)
Constructs a basic regular expression from the range [first, last) interpreted according to the flags...
regex_token_iterator< string::const_iterator > sregex_token_iterator
Token iterator for standard strings.
basic_regex & assign(initializer_list< _Ch_type > __l, flag_type __f=regex_constants::ECMAScript)
Assigns a new regular expression to a regex object.
back_insert_iterator< _Container > back_inserter(_Container &__x)
static const error_type error_paren(_S_error_paren)
basic_regex< wchar_t > wregex
Standard wide-character regular expressions.
sub_match< const char * > csub_match
Standard regex submatch over a C-style null-terminated string.
static const syntax_option_type grep
ios_base & oct(ios_base &__base)
Calls base.setf(ios_base::oct, ios_base::basefield).
Container class for localization functionality.
static const error_type error_collate(_S_error_collate)
static const syntax_option_type extended
One of two subclasses of exception.
int compare(const sub_match &__s) const
Compares this and another matched sequence.
basic_regex(const _Ch_type *__p, flag_type __f=regex_constants::ECMAScript)
Constructs a basic regular expression from the sequence [p, p + char_traits<_Ch_type>::length(p)) int...
static const match_flag_type format_default
difference_type length() const
~basic_regex()
Destroys a basic regular expression.
static const match_flag_type match_not_bow
string_type transform(const _CharT *__lo, const _CharT *__hi) const
Transform string to comparable form.
difference_type length(size_type __sub=0) const
Gets the length of the indicated submatch.
regex_token_iterator< const wchar_t * > wcregex_token_iterator
Token iterator for C-style NULL-terminated wide strings.
static const syntax_option_type ECMAScript
bool operator!=(const regex_iterator &__rhs)
string_type transform(_Fwd_iter __first, _Fwd_iter __last) const
Gets a sort key for a character sequence.
static const syntax_option_type collate
bool 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)
static const match_flag_type match_not_eow
regex_token_iterator & operator=(const regex_token_iterator &__rhs)
Assigns a regex_token_iterator to another.
basic_regex(const basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=regex_constants::ECMAScript)
Constructs a basic regular expression from the string s interpreted according to the flags in f...
void swap(vector &&__x)
Swaps data with another vector.
basic_regex & assign(const basic_string< _Ch_type, _Ch_typeraits, _Allocator > &__s, flag_type __f=regex_constants::ECMAScript)
Assigns a new regular expression to a regex object from a string containing a regular expression patt...
int value(_Ch_type __ch, int __radix) const
Converts a digit to an int.
const value_type & operator*()
Dereferences a regex_token_iterator.
__syntax_option
This is a bitmask type indicating how to interpret the regex.
static const error_type error_ctype(_S_error_ctype)
static const error_type error_brack(_S_error_brack)
char_type translate(char_type __c) const
Performs the identity translation.
match_results(const _Allocator &__a=_Allocator())
Constructs a default match_results container.
bool empty() const
Indicates if the match_results contains no results.
basic_regex & assign(const _Ch_type *__p, std::size_t __len, flag_type __flags)
Assigns a new regular expression to a regex object from a C-style string containing a regular express...
locale_type imbue(locale_type __loc)
Imbues the regex_traits object with a copy of a new locale.
static const error_type error_brace(_S_error_brace)
Forward iterators support a superset of input iterator operations.
Facet for localized string comparison.
static const match_flag_type match_not_null
regex_error(regex_constants::error_type __ecode)
Constructs a regex_error object.
static const match_flag_type format_sed
flag_type flags() const
Gets the flags used to construct the regular expression or in the last call to assign().
static const match_flag_type match_not_bol
Managing sequences of characters and character-like objects.
_Out_iter format(_Out_iter __out, const string_type &__fmt, regex_constants::match_flag_type __flags=regex_constants::format_default) const
static const syntax_option_type basic
basic_regex & assign(_InputIterator __first, _InputIterator __last, flag_type __flags=regex_constants::ECMAScript)
Assigns a new regular expression to a regex object.