31 namespace std _GLIBCXX_VISIBILITY(default)
33 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _Ch_type>
54 typedef _Ch_type char_type;
57 typedef std::ctype_base::mask char_class_type;
77 {
return string_type::traits_type::length(__p); }
103 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
104 return __fctyp.tolower(__c);
127 template<
typename _Fwd_iter>
132 const __collate_type& __fclt(use_facet<__collate_type>(_M_locale));
133 string_type __s(__first, __last);
134 return __fclt.transform(__s.
data(), __s.
data() + __s.
size());
151 template<
typename _Fwd_iter>
154 {
return string_type(); }
169 template<
typename _Fwd_iter>
172 {
return string_type(); }
213 template<
typename _Fwd_iter>
216 bool __icase =
false)
const
232 isctype(_Ch_type __c, char_class_type __f)
const;
245 value(_Ch_type __ch,
int __radix)
const;
271 {
return _M_locale; }
274 locale_type _M_locale;
277 template<
typename _Ch_type>
280 isctype(_Ch_type __c, char_class_type __f)
const
283 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
285 if (__fctyp.is(__f, __c))
289 if (__c == __fctyp.widen(
'_'))
291 const char __wb[] =
"w";
292 char_class_type __wt = this->lookup_classname(__wb,
293 __wb +
sizeof(__wb));
299 if (__fctyp.is(std::ctype_base::space, __c))
301 const char __bb[] =
"blank";
302 char_class_type __bt = this->lookup_classname(__bb,
303 __bb +
sizeof(__bb));
311 template<
typename _Ch_type>
314 value(_Ch_type __ch,
int __radix)
const
316 std::basic_istringstream<char_type> __is(
string_type(1, __ch));
320 else if (__radix == 16)
323 return __is.fail() ? -1 : __v;
334 template<
typename _Ch_type,
typename _Rx_traits = regex_traits<_Ch_type> >
339 typedef _Ch_type value_type;
340 typedef _Rx_traits traits_type;
341 typedef typename traits_type::string_type string_type;
343 typedef typename traits_type::locale_type locale_type;
368 : _M_flags(ECMAScript),
369 _M_automaton(__detail::__compile<const _Ch_type*, _Rx_traits>(0, 0,
370 _M_traits, _M_flags))
387 _M_automaton(__detail::__compile(__p, __p + _Rx_traits::length(__p),
388 _M_traits, _M_flags))
403 basic_regex(
const _Ch_type* __p, std::size_t __len, flag_type __f)
405 _M_automaton(__detail::__compile(__p, __p + __len, _M_traits, _M_flags))
414 : _M_flags(__rhs._M_flags), _M_traits(__rhs._M_traits),
415 _M_automaton(__rhs._M_automaton)
424 : _M_flags(__rhs._M_flags), _M_traits(__rhs._M_traits),
425 _M_automaton(
std::
move(__rhs._M_automaton))
437 template<
typename _Ch_traits,
typename _Ch_alloc>
441 flag_type __f = ECMAScript)
443 _M_automaton(__detail::__compile(__s.
begin(), __s.
end(),
444 _M_traits, _M_flags))
460 template<
typename _InputIterator>
462 flag_type __f = ECMAScript)
464 _M_automaton(__detail::__compile(__first, __last, _M_traits, _M_flags))
476 flag_type __f = ECMAScript)
478 _M_automaton(__detail::__compile(__l.
begin(), __l.
end(),
479 _M_traits, _M_flags))
493 {
return this->
assign(__rhs); }
519 template<
typename _Ch_typeraits,
typename _Alloc>
565 assign(
const _Ch_type* __p, flag_type __flags = ECMAScript)
566 {
return this->
assign(string_type(__p), __flags); }
582 assign(
const _Ch_type* __p, std::size_t __len, flag_type __flags)
583 {
return this->
assign(string_type(__p, __len), __flags); }
596 template<
typename _Ch_typeraits,
typename _Alloc>
599 flag_type __flags = ECMAScript)
619 template<
typename _InputIterator>
621 assign(_InputIterator __first, _InputIterator __last,
622 flag_type __flags = ECMAScript)
623 {
return this->
assign(string_type(__first, __last), __flags); }
637 assign(initializer_list<_Ch_type> __l, flag_type __flags = ECMAScript)
638 {
return this->
assign(__l.begin(), __l.end(), __flags); }
647 {
return _M_automaton->_M_sub_count() - 1; }
665 {
return _M_traits.imbue(__loc); }
673 {
return _M_traits.getloc(); }
686 std::swap(_M_automaton, __rhs._M_automaton);
689 #ifdef _GLIBCXX_DEBUG
691 _M_dot(std::ostream& __ostr)
692 { _M_automaton->_M_dot(__ostr); }
696 _M_get_automaton()
const
697 {
return _M_automaton; }
701 _Rx_traits _M_traits;
708 #ifdef _GLIBCXX_USE_WCHAR_T
720 template<
typename _Ch_type,
typename _Rx_traits>
724 { __lhs.
swap(__rhs); }
740 template<
typename _BiIter>
743 typedef iterator_traits<_BiIter> __iter_traits;
746 typedef typename __iter_traits::value_type value_type;
747 typedef typename __iter_traits::difference_type difference_type;
748 typedef _BiIter iterator;
772 operator string_type()
const
839 #ifdef _GLIBCXX_USE_WCHAR_T
855 template<
typename _BiIter>
858 {
return __lhs.
compare(__rhs) == 0; }
866 template<
typename _BiIter>
869 {
return __lhs.
compare(__rhs) != 0; }
877 template<
typename _BiIter>
880 {
return __lhs.
compare(__rhs) < 0; }
888 template<
typename _BiIter>
891 {
return __lhs.
compare(__rhs) <= 0; }
899 template<
typename _BiIter>
902 {
return __lhs.
compare(__rhs) >= 0; }
910 template<
typename _BiIter>
913 {
return __lhs.
compare(__rhs) > 0; }
916 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
917 using __sub_match_string = basic_string<
918 typename iterator_traits<_Bi_iter>::value_type,
919 _Ch_traits, _Ch_alloc>;
928 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
941 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
945 {
return !(__lhs == __rhs); }
953 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
955 operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
957 {
return __rhs.
compare(__lhs.c_str()) > 0; }
965 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
969 {
return __rhs < __lhs; }
977 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
981 {
return !(__lhs < __rhs); }
989 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
991 operator<=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
993 {
return !(__rhs < __lhs); }
1002 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1015 template<
typename _Bi_iter,
typename _Ch_traits,
typename _Ch_alloc>
1019 {
return !(__lhs == __rhs); }
1027 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1029 operator<(const sub_match<_Bi_iter>& __lhs,
1031 {
return __lhs.
compare(__rhs.c_str()) < 0; }
1039 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1043 {
return __rhs < __lhs; }
1051 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1055 {
return !(__lhs < __rhs); }
1063 template<
typename _Bi_iter,
class _Ch_traits,
class _Ch_alloc>
1065 operator<=(const sub_match<_Bi_iter>& __lhs,
1067 {
return !(__rhs < __lhs); }
1076 template<
typename _Bi_iter>
1078 operator==(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1080 {
return __rhs.
compare(__lhs) == 0; }
1089 template<
typename _Bi_iter>
1091 operator!=(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1093 {
return !(__lhs == __rhs); }
1101 template<
typename _Bi_iter>
1103 operator<(typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1105 {
return __rhs.
compare(__lhs) > 0; }
1113 template<
typename _Bi_iter>
1115 operator>(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1117 {
return __rhs < __lhs; }
1125 template<
typename _Bi_iter>
1127 operator>=(
typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1129 {
return !(__lhs < __rhs); }
1137 template<
typename _Bi_iter>
1139 operator<=(typename iterator_traits<_Bi_iter>::value_type
const* __lhs,
1141 {
return !(__rhs < __lhs); }
1150 template<
typename _Bi_iter>
1153 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1154 {
return __lhs.
compare(__rhs) == 0; }
1163 template<
typename _Bi_iter>
1166 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1167 {
return !(__lhs == __rhs); }
1175 template<
typename _Bi_iter>
1177 operator<(const sub_match<_Bi_iter>& __lhs,
1178 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1179 {
return __lhs.compare(__rhs) < 0; }
1187 template<
typename _Bi_iter>
1190 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1191 {
return __rhs < __lhs; }
1199 template<
typename _Bi_iter>
1202 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1203 {
return !(__lhs < __rhs); }
1211 template<
typename _Bi_iter>
1213 operator<=(const sub_match<_Bi_iter>& __lhs,
1214 typename iterator_traits<_Bi_iter>::value_type
const* __rhs)
1215 {
return !(__rhs < __lhs); }
1224 template<
typename _Bi_iter>
1226 operator==(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1230 return __rhs.
compare(string_type(1, __lhs)) == 0;
1240 template<
typename _Bi_iter>
1242 operator!=(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1244 {
return !(__lhs == __rhs); }
1252 template<
typename _Bi_iter>
1254 operator<(typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1258 return __rhs.
compare(string_type(1, __lhs)) > 0;
1267 template<
typename _Bi_iter>
1269 operator>(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1271 {
return __rhs < __lhs; }
1279 template<
typename _Bi_iter>
1281 operator>=(
typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1283 {
return !(__lhs < __rhs); }
1291 template<
typename _Bi_iter>
1293 operator<=(typename iterator_traits<_Bi_iter>::value_type
const& __lhs,
1295 {
return !(__rhs < __lhs); }
1304 template<
typename _Bi_iter>
1307 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1310 return __lhs.
compare(string_type(1, __rhs)) == 0;
1320 template<
typename _Bi_iter>
1323 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1324 {
return !(__lhs == __rhs); }
1332 template<
typename _Bi_iter>
1334 operator<(const sub_match<_Bi_iter>& __lhs,
1335 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1338 return __lhs.
compare(string_type(1, __rhs)) < 0;
1347 template<
typename _Bi_iter>
1350 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1351 {
return __rhs < __lhs; }
1359 template<
typename _Bi_iter>
1362 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1363 {
return !(__lhs < __rhs); }
1371 template<
typename _Bi_iter>
1373 operator<=(const sub_match<_Bi_iter>& __lhs,
1374 typename iterator_traits<_Bi_iter>::value_type
const& __rhs)
1375 {
return !(__rhs < __lhs); }
1385 template<
typename _Ch_type,
typename _Ch_traits,
typename _Bi_iter>
1387 basic_ostream<_Ch_type, _Ch_traits>&
1388 operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
1390 {
return __os << __m.
str(); }
1397 template<
typename _Bi_iter>
1398 inline const sub_match<_Bi_iter>&
1401 static const sub_match<_Bi_iter> __unmatched = sub_match<_Bi_iter>();
1427 template<
typename _Bi_iter,
1428 typename _Alloc = allocator<sub_match<_Bi_iter> > >
1430 :
private std::vector<sub_match<_Bi_iter>, _Alloc>
1445 typedef std::iterator_traits<_Bi_iter> __iter_traits;
1453 typedef _Alloc allocator_type;
1457 typedef typename _Base_type::const_iterator const_iterator;
1458 typedef const_iterator iterator;
1459 typedef typename __iter_traits::difference_type difference_type;
1460 typedef typename __iter_traits::value_type char_type;
1493 : _Base_type(
std::
move(__rhs))
1550 return (__size && _Base_type::operator[](0).matched) ? __size - 2 : 0;
1564 {
return size() == 0; }
1583 {
return (*
this)[__sub].length(); }
1602 (*
this)[__sub].first) : -1;
1615 str(size_type __sub = 0)
const
1616 {
return (*
this)[__sub].str(); }
1632 _GLIBCXX_DEBUG_ASSERT(
ready() );
1633 return __sub <
size()
1635 : __unmatched_sub<_Bi_iter>();
1649 _GLIBCXX_DEBUG_ASSERT(
ready() );
1652 : __unmatched_sub<_Bi_iter>();
1666 _GLIBCXX_DEBUG_ASSERT(
ready() );
1669 : __unmatched_sub<_Bi_iter>();
1716 template<
typename _Out_iter>
1718 format(_Out_iter __out,
const char_type* __fmt_first,
1719 const char_type* __fmt_last,
1726 template<
typename _Out_iter,
typename _St,
typename _Sa>
1738 template<
typename _Out_iter,
typename _St,
typename _Sa>
1755 string_type __result;
1774 {
return _Base_type::get_allocator(); }
1795 typedef match_results<const char*> cmatch;
1796 typedef match_results<string::const_iterator> smatch;
1797 #ifdef _GLIBCXX_USE_WCHAR_T
1798 typedef match_results<const wchar_t*> wcmatch;
1799 typedef match_results<wstring::const_iterator> wsmatch;
1808 template<
typename _Bi_iter,
typename _Alloc>
1832 template<
typename _Bi_iter,
class _Alloc>
1836 {
return !(__m1 == __m2); }
1846 template<
typename _Bi_iter,
typename _Alloc>
1850 { __lhs.
swap(__rhs); }
1875 template<
typename _Bi_iter,
typename _Alloc,
1876 typename _Ch_type,
typename _Rx_traits>
1886 __detail::_Automaton::_SizeT __sz = __a->_M_sub_count();
1890 return __m[0].matched;
1907 template<
typename _Bi_iter,
typename _Ch_type,
typename _Rx_traits>
1915 return regex_match(__first, __last, __what, __re, __flags);
1932 template<
typename _Ch_type,
typename _Alloc,
typename _Rx_traits>
1939 {
return regex_match(__s, __s + _Rx_traits::length(__s), __m, __re, __f); }
1955 template<
typename _Ch_traits,
typename _Ch_alloc,
1956 typename _Alloc,
typename _Ch_type,
typename _Rx_traits>
1960 _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m,
1979 template<
typename _Ch_type,
class _Rx_traits>
1985 {
return regex_match(__s, __s + _Rx_traits::length(__s), __re, __f); }
2000 template<
typename _Ch_traits,
typename _Str_allocator,
2001 typename _Ch_type,
typename _Rx_traits>
2025 template<
typename _Bi_iter,
typename _Alloc,
2026 typename _Ch_type,
typename _Rx_traits>
2047 template<
typename _Bi_iter,
typename _Ch_type,
typename _Rx_traits>
2055 return regex_search(__first, __last, __what, __re, __flags);
2071 template<
typename _Ch_type,
class _Alloc,
class _Rx_traits>
2078 {
return regex_search(__s, __s + _Rx_traits::length(__s), __m, __e, __f); }
2091 template<
typename _Ch_type,
typename _Rx_traits>
2097 {
return regex_search(__s, __s + _Rx_traits::length(__s), __e, __f); }
2110 template<
typename _Ch_traits,
typename _String_allocator,
2111 typename _Ch_type,
typename _Rx_traits>
2114 _String_allocator>& __s,
2118 {
return regex_search(__s.begin(), __s.end(), __e, __flags); }
2132 template<
typename _Ch_traits,
typename _Ch_alloc,
2133 typename _Alloc,
typename _Ch_type,
2134 typename _Rx_traits>
2138 _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m,
2159 template<
typename _Out_iter,
typename _Bi_iter,
2160 typename _Rx_traits,
typename _Ch_type>
2180 template<
typename _Rx_traits,
typename _Ch_type>
2181 inline basic_string<_Ch_type>
2190 __s.
begin(), __s.
end(), __e, __fmt, __flags);
2201 template<
typename _Bi_iter,
2202 typename _Ch_type =
typename iterator_traits<_Bi_iter>::value_type,
2203 typename _Rx_traits = regex_traits<_Ch_type> >
2209 typedef std::ptrdiff_t difference_type;
2210 typedef const value_type*
pointer;
2211 typedef const value_type& reference;
2231 regex_iterator(_Bi_iter __a, _Bi_iter __b,
const regex_type& __re,
2295 const regex_type* pregex;
2302 #ifdef _GLIBCXX_USE_WCHAR_T
2315 template<
typename _Bi_iter,
2316 typename _Ch_type =
typename iterator_traits<_Bi_iter>::value_type,
2323 typedef std::ptrdiff_t difference_type;
2324 typedef const value_type*
pointer;
2325 typedef const value_type& reference;
2377 const regex_type& __re,
2394 template<std::
size_t _Nm>
2396 const regex_type& __re,
2397 const int (&__submatches)[_Nm],
2413 regex_token_iterator&
2414 operator=(
const regex_token_iterator& __rhs);
2421 operator==(
const regex_token_iterator& __rhs);
2428 operator!=(
const regex_token_iterator& __rhs);
2448 regex_token_iterator&
2455 regex_token_iterator
2461 position_iterator __position;
2462 const value_type* __result;
2463 value_type __suffix;
2474 #ifdef _GLIBCXX_USE_WCHAR_T
2483 _GLIBCXX_END_NAMESPACE_VERSION
basic_string< char_type, _St, _Sa > format(const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const
regex_token_iterator()
Default constructs a regex_token_iterator.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
int compare(const sub_match &__s) const
Compares this and another matched sequence.
const_reference operator[](size_type __sub) const
Gets a sub_match reference for the match or submatch.
sub_match< const wchar_t * > wcsub_match
Regex submatch over a C-style null-terminated wide string.
constexpr match_flag_type match_default
bool equal(_II1 __first1, _II1 __last1, _II2 __first2)
Tests a range for element-wise equality.
bool operator!=(const match_results< _Bi_iter, _Alloc > &__m1, const match_results< _Bi_iter, _Alloc > &__m2)
Compares two match_results for inequality.
Facet for localized string comparison.
bool empty() const
Indicates if the match_results contains no results.
Basis for explicit traits specializations.
iterator begin() noexcept
basic_regex & assign(basic_regex &&__rhs) noexcept
The move-assignment operator.
_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 max_size() const
Gets the number of matches and submatches.
A standard container which offers fixed time access to individual elements in any order...
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
bool operator==(const regex_iterator &__rhs)
static std::size_t length(const char_type *__p)
Gives the length of a C-style string starting at __p.
constexpr syntax_option_type extended
locale_type getloc() const
Gets the locale currently imbued in the regular expression object.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
string_type str(size_type __sub=0) const
Gets the match or submatch converted to a string type.
const_iterator begin() const
Gets an iterator to the start of the sub_match collection.
sub_match< const char * > csub_match
Standard regex submatch over a C-style null-terminated string.
basic_regex< char > regex
Standard regular expressions.
Class regex_traits. Describes aspects of a regular expression.
string_type lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const
Gets a collation element by name.
_Out_iter format(_Out_iter __out, const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const
match_results(const _Alloc &__a=_Alloc())
Constructs a default match_results container.
regex_token_iterator & operator=(const regex_token_iterator &__rhs)
Assigns a regex_token_iterator to another.
constexpr syntax_option_type nosubs
const value_type & operator*()
Dereferences a regex_token_iterator.
auto end(_Container &__cont) -> decltype(__cont.end())
Return an iterator pointing to one past the last element of the container.
regex_traits()
Constructs a default traits object.
difference_type length(size_type __sub=0) const
Gets the length of the indicated submatch.
iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
const value_type * operator->()
Selects a regex_token_iterator member.
const_iterator cend() const
Gets an iterator to one-past-the-end of the collection.
basic_regex(const std::basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=ECMAScript)
Constructs a basic regular expression from the string s interpreted according to the flags in f...
_Out_iter format(_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, match_flag_type __flags=regex_constants::format_default) const
void swap(vector &__x) noexcept(_Alloc_traits::_S_nothrow_swap())
Swaps data with another vector.
difference_type length() const
basic_regex & assign(initializer_list< _Ch_type > __l, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object.
basic_regex & assign(const basic_regex &__rhs)
the real assignment operator.
regex_token_iterator< string::const_iterator > sregex_token_iterator
Token iterator for standard strings.
match_results(match_results &&__rhs) noexcept
Move constructs a match_results.
bool isctype(_Ch_type __c, char_class_type __f) const
Determines if c is a member of an identified class.
constexpr syntax_option_type grep
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
sub_match< wstring::const_iterator > wssub_match
Regex submatch over a standard wide string.
Managing sequences of characters and character-like objects.
bool operator==(const regex_token_iterator &__rhs)
Compares a regex_token_iterator to another for equality.
reference operator[](size_type __n)
Subscript access to the data contained in the vector.
constexpr syntax_option_type ECMAScript
bool operator>=(const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
Test if string doesn't precede string.
basic_regex & assign(_InputIterator __first, _InputIterator __last, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object.
~match_results()
Destroys a match_results object.
iterator begin() noexcept
bool operator!=(const regex_token_iterator &__rhs)
Compares a regex_token_iterator to another for inequality.
basic_regex(const basic_regex &__rhs)
Copy-constructs a basic regular expression.
bool regex_match(_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__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...
match_results & operator=(const match_results &__rhs)
Assigns rhs to *this.
A _Results facade specialized for wrapping a templated match_results.
int compare(const basic_string &__str) const
Compare to a string.
__size_type size_type
The allocator's size type.
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.
basic_regex(_InputIterator __first, _InputIterator __last, flag_type __f=ECMAScript)
Constructs a basic regular expression from the range [first, last) interpreted according to the flags...
string_type transform_primary(_Fwd_iter __first, _Fwd_iter __last) const
Gets a sort key for a character sequence, independent of case.
size_type size() const
Gets the number of matches and submatches.
sub_match< string::const_iterator > ssub_match
Standard regex submatch over a standard string.
unsigned int mark_count() const
Gets the number of marked subexpressions within the regular expression.
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...
ISO C++ entities toplevel namespace is std.
_BiIter first
second_type is the second bound type
allocator_type get_allocator() const
Gets a copy of the allocator.
const value_type * operator->()
constexpr match_flag_type format_default
const_iterator cbegin() const noexcept
difference_type position(size_type __sub=0) const
Gets the offset of the beginning of the indicated submatch.
std::shared_ptr< _Automaton > _AutomatonPtr
Generic shared pointer to an automaton.
const_reference suffix() const
Gets a sub_match representing the match suffix.
int compare(const value_type *__s) const
Compares this sub_match to a C-style string.
regex_token_iterator< const char * > cregex_token_iterator
Token iterator for C-style NULL-terminated strings.
basic_regex & assign(const _Ch_type *__p, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object from a C-style null-terminated string containing a...
basic_regex(initializer_list< _Ch_type > __l, flag_type __f=ECMAScript)
Constructs a basic regular expression from an initializer list.
basic_regex & operator=(basic_regex &&__rhs) noexcept
Move-assigns one regular expression to another.
bool ready() const
Indicates if the match_results is ready.
char_type translate_nocase(char_type __c) const
Translates a character into a case-insensitive equivalent.
regex_iterator()
Provides a singular iterator, useful for indicating one-past-the-end of a range.
void swap(match_results &__that)
Swaps the contents of two match_results.
std::bitset< _S_match_flag_last > match_flag_type
This is a bitmask type indicating regex matching rules.
~basic_regex()
Destroys a basic regular expression.
const_iterator cbegin() const
Gets an iterator to the start of the sub_match collection.
string_type transform(_Fwd_iter __first, _Fwd_iter __last) const
Gets a sort key for a character sequence.
void swap(basic_regex &__rhs)
Swaps the contents of two regular expression objects.
constexpr syntax_option_type awk
Forward iterators support a superset of input iterator operations.
The results of a match or search operation.
constexpr syntax_option_type optimize
basic_regex & operator=(const basic_string< _Ch_type, _Ch_typeraits, _Alloc > &__s)
Replaces a regular expression with a new one constructed from a string.
Executes a regular expression NFA/DFA over a range using a variant of the parallel execution algorith...
constexpr syntax_option_type icase
flag_type flags() const
Gets the flags used to construct the regular expression or in the last call to assign().
match_results & operator=(match_results &&__rhs)
Move-assigns rhs to *this.
bool operator==(const match_results< _Bi_iter, _Alloc > &__m1, const match_results< _Bi_iter, _Alloc > &__m2)
Compares two match_results for equality.
back_insert_iterator< _Container > back_inserter(_Container &__x)
unsigned int syntax_option_type
This is a bitmask type indicating how to interpret the regex.
basic_regex< wchar_t > wregex
Standard wide-character regular expressions.
auto begin(_Container &__cont) -> decltype(__cont.begin())
Return an iterator pointing to the first element of the container.
ios_base & oct(ios_base &__base)
Calls base.setf(ios_base::oct, ios_base::basefield).
Provides a cursor into the specific target string.
basic_regex(const basic_regex &&__rhs) noexcept
Move-constructs a basic regular expression.
basic_regex(const _Ch_type *__p, flag_type __f=ECMAScript)
Constructs a basic regular expression from the sequence [__p, __p + char_traits<_Ch_type>::length(__p...
void swap(_Tp &, _Tp &) noexcept(__and_< is_nothrow_move_constructible< _Tp >, is_nothrow_move_assignable< _Tp >>::value)
Swaps two values.
Primary class template ctype facet.This template class defines classification and conversion function...
const_iterator end() const
Gets an iterator to one-past-the-end of the collection.
char_type translate(char_type __c) const
Performs the identity translation.
int compare(const string_type &__s) const
Compares this sub_match to a string.
constexpr syntax_option_type basic
regex_token_iterator< const wchar_t * > wcregex_token_iterator
Token iterator for C-style NULL-terminated wide strings.
int value(_Ch_type __ch, int __radix) const
Converts a digit to an int.
basic_regex & operator=(const _Ch_type *__p)
Replaces a regular expression with a new one constructed from a C-style null-terminated string...
constexpr syntax_option_type egrep
regex_token_iterator< wstring::const_iterator > wsregex_token_iterator
Token iterator for standard wide-character strings.
regex_iterator & operator=(const regex_iterator &__rhs)
locale_type imbue(locale_type __loc)
Imbues the regular expression object with the given locale.
locale_type getloc() const
Gets a copy of the current locale in use by the regex_traits object.
string_type format(const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const
char_class_type lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool __icase=false) const
Maps one or more characters to a named character classification.
bool operator!=(const regex_iterator &__rhs)
size_type size() const noexcept
const value_type & operator*()
basic_regex & operator=(const basic_regex &__rhs)
Assigns one regular expression to another.
Struct holding two objects of arbitrary type.
regex_token_iterator & operator++()
Increments a regex_token_iterator.
bool regex_search(_Bi_iter __first, _Bi_iter __last, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
regex_iterator & operator++()
constexpr syntax_option_type collate
basic_regex & assign(const basic_string< _Ch_type, _Ch_typeraits, _Alloc > &__s, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object from a string containing a regular expression patt...
string_type str() const
Gets the matching sequence as a string.
size_type max_size() const noexcept
_BiIter second
first is a copy of the first object
match_results(const match_results &__rhs)
Copy constructs a match_results.
bool empty() const noexcept
const_reference prefix() const
Gets a sub_match representing the match prefix.
bool operator>(const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
Test if string follows string.
const _CharT * data() const noexcept
Return const pointer to contents.
ios_base & hex(ios_base &__base)
Calls base.setf(ios_base::hex, ios_base::basefield).