Difference between revisions of "cpp/regex/sub match"
From cppreference.com
(add matched member) |
(import from old wiki) |
||
Line 7: | Line 7: | ||
}} | }} | ||
+ | The class template {{tt|sub_match}} is used by the regular expression engine to denote sequences of characters matched by marked sub-expressions. | ||
{{todo}} | {{todo}} | ||
+ | |||
+ | Several specializations for common character sequence types are provided: | ||
+ | |||
+ | {{tdcl list begin}} | ||
+ | {{tdcl list header | regex}} | ||
+ | {{tdcl list hitem | Type | Definition}} | ||
+ | {{tdcl list item | {{tt|csub_match}} | {{cpp|sub_match<const char*>}}}} | ||
+ | {{tdcl list item | {{tt|wcsub_match}} | {{cpp|sub_match<const wchar_t*>}}}} | ||
+ | {{tdcl list item | {{tt|ssub_match}} | {{cpp|sub_match<std::string::const_iterator>}}}} | ||
+ | {{tdcl list item | {{tt|wssub_match}} | {{cpp|sub_match<std::wstring::const_iterator>}}}} | ||
+ | {{tdcl list end}} | ||
Inherits {{cpp|std::pair<BidirectionalIterator, BidirectionalIterator>}} | Inherits {{cpp|std::pair<BidirectionalIterator, BidirectionalIterator>}} | ||
Line 25: | Line 37: | ||
{{dcl list h2 | Observers}} | {{dcl list h2 | Observers}} | ||
− | {{dcl list mem fun | cpp/regex/sub_match/length | returns the length of the | + | {{dcl list mem fun | cpp/regex/sub_match/length | returns the length of the match, if any}} |
− | {{dcl list mem fun | cpp/regex/sub_match/operator string_type | | + | {{dcl list mem fun | cpp/regex/sub_match/operator string_type | cast to the underlying string type}} |
{{dcl list mem fun | cpp/regex/sub_match/str | returns the matched subsequence}} | {{dcl list mem fun | cpp/regex/sub_match/str | returns the matched subsequence}} | ||
− | {{dcl list mem fun | cpp/regex/sub_match/compare | compares | + | {{dcl list mem fun | cpp/regex/sub_match/compare | compares matched subsequence (if any)}} |
{{dcl list h1 | Member objects}} | {{dcl list h1 | Member objects}} | ||
− | {{dcl list mem obj | cpp/regex/sub_match/matched | defines whether this match | + | {{dcl list mem obj | cpp/regex/sub_match/matched | defines whether this match was successful}} |
{{dcl list h1 | Non-member functions}} | {{dcl list h1 | Non-member functions}} | ||
{{dcl list end}} | {{dcl list end}} | ||
{{todo | reason=non-member functions}} | {{todo | reason=non-member functions}} |
Revision as of 04:08, 22 July 2011
Template:cpp/regex/sub match/sidebar
Defined in header <regex>
|
||
template< class BidirectionalIterator |
Template:mark c++0x feature | |
The class template sub_match
is used by the regular expression engine to denote sequences of characters matched by marked sub-expressions.
This section is incomplete |
Several specializations for common character sequence types are provided:
Template:tdcl list begin Template:tdcl list header Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list end
Inherits Template:cpp
Template:tdcl list begin Template:tdcl list h1 Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list end
Member functions | ||
Observers | ||
returns the length of the match, if any (public member function) | ||
cast to the underlying string type (public member function) | ||
returns the matched subsequence (public member function) | ||
compares matched subsequence (if any) (public member function) | ||
Member objects | ||
defines whether this match was successful (public member object) | ||
Non-member functions |
This section is incomplete Reason: non-member functions |