std::regex_token_iterator是访问底层字符序列内每个正则表达式匹配的单独子匹配的只读老式向前迭代器(LegacyForwardIterator)。它也可以用于访问没有匹配到给定的正则表达式的序列部分(例如作为记号化器)。 构造时,它构造一个std::regex_iterator,而在每次自增时,它越过请求的来自当前匹配结果的子匹配,并在自增离开上...
std::regex_token_iterator是只读ForwardIterator它访问底层字符序列中正则表达式的每个匹配项的单个子匹配。它还可以用于访问序列中与给定正则表达式%28不匹配的部分。作为标记器%29。 在构造上,它构造了一个std::regex_iterator在每一个增量上,它都会从当前匹配中逐步遍历请求的子匹配。[医]结果,递增基础regex_iterat...
regex_token_iterator(); (1) (since C++11) regex_token_iterator( BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, std::regex_constants::match_flag_type m = std::regex_constants::match_default ); ...
C++ 正则表达式库 std::regex_token_iterator regex_token_iterator& operator++(); (C++11 起) regex_token_iterator operator++( int ); (C++11 起) 令迭代器前进到下个子匹配。 本节未完成原因:更好的解释。例如,subs 为仅用于阐释的匹配子表达式的向量。 若...
bool operator==( const regex_token_iterator& other ) const; (1) (since C++11) bool operator!=( const regex_token_iterator& other ) const; (2) (since C++11) (until C++20) Checks whether *this and other are equivalent. Two regex token iterators are equal if: ...
std::regex_token_iterator 是访问底层字符序列内每个正则表达式匹配的单独子匹配的只读遗留向前迭代器 (LegacyForwardIterator) 。它亦可用于访问不为给定的正则表达式所匹配的序列部分(例如作为记号化器)。 构造时,它构造一个 std::regex_iterator ,而在每次自增时,它走过请求的来自当前 match_results 的子匹配,并...
std::regex_token_iterator<std::string::iterator> a ( s.begin(), s.end(), e ); while(a!=rend)std::cout<<" ["<< *a++ <<"]"; std::cout<<std::endl; return0; } 输出: 整个Amtches:[主题] [潜水艇] [jourcequeque]
A typical implementation ofstd::regex_token_iteratorholds the underlyingstd::regex_iterator, a container (e.g.std::vector<int>) of the requested submatch indices, the internal counter equal to the index of the submatch, a pointer tostd::sub_match, pointing at the current submatch of the...
代码语言:txt 复制 © cppreference.com 在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。 http://en.cppreference.com/w/cpp/regex/regex[医]令牌[医]迭代器/算子[医]星[医] 本文档系腾讯云开发者社区成员共同维护,如有问题请联系cloudcommunity@tencent.com ...
Class template std::function is a general-purpose polymorphic function wrapper. Instances of std::...