The class template
regex_iterator is an iterator adaptor
. It represents a new view of an existing iterator sequence, by
enumerating all the occurrences of a regular expression within that
sequence
. A
regex_iterator uses
regex_search to find successive
regular expression matches within the sequence from which it was
constructed
. After the iterator is constructed, and every time
operator++ is
used, the iterator finds and stores a value of
match_results<BidirectionalIterator>. If the end of the sequence is
reached (
regex_search returns
false), the iterator becomes equal to
the end-of-sequence iterator value
. The default constructor
constructs an end-of-sequence iterator object,
which is the only legitimate iterator to be used for the end
condition
. The result of
operator* on an end-of-sequence iterator is not
defined
. For any other iterator value a const
match_results<BidirectionalIterator>& is returned
. The result of
operator-> on an end-of-sequence iterator is not defined
. For any other
iterator value a
const match_results<BidirectionalIterator>* is
returned
. It is impossible to store things into
regex_iterators
. Two
end-of-sequence iterators are always equal
. An end-of-sequence
iterator is not equal to a non-end-of-sequence iterator
. Two
non-end-of-sequence iterators are equal when they are constructed from
the same arguments
.