匹配的迭代器类。
template<class BidIt, class Elem = iterator_traits<BidIt>::value_type,
class RXtraits = regex_traits<Elem> >
class regex_iterator {
public:
typedef basic_regex<Elem, RXtraits> regex_type;
typedef match_results<BidIt> value_type;
typedef std::forward_iterator_tag iterator_category;
typedef std::ptrdiff_t difference_type;
typedef const match_results<BidIt>* pointer;
typedef const match_results<BidIt>& reference;
regex_iterator();
regex_iterator(BidIt first, BidIt last,
const regex_type& re,
regex_constants::match_flag_type f = regex_constants::match_default);
bool operator==(const regex_iterator& right);
bool operator!=(const regex_iterator& right);
const match_results<BidIt>& operator*();
const match_results<BidIt> *operator->();
regex_iterator& operator++();
regex_iterator& operator++(int);
BidIt begin; // exposition only
BidIt end; // exposition only
regex_type *pregex; // exposition only
regex_constants::match_flag_type flags; // exposition only
match_results<BidIt> match; // exposition only
};
参数
BidIt
子匹配项的迭代器类型。Elem
元素的类型要匹配的。RXtraits
元素的特征的类。
备注
模板类描述常数的前向迭代器对象。该循环访问应用它对迭代范围内定义的字符序列的正则表达式对象提取类型 match_results<BidIt> 对象 *pregex[begin, end)。
示例
为正则表达式的示例参见以下主题:
要求
**标题:**regex
命名空间: std