gpt4 book ai didi

c++ - 什么是正则表达式中的不匹配匹配?

转载 作者:太空狗 更新时间:2023-10-29 22:55:25 27 4
gpt4 key购买 nike

来自 https://en.cppreference.com/w/cpp/regex/match_results/str :

if n >= size(), a string representing the unmatched match is returned.

这是什么不匹配

最佳答案

The call is equivalent to string_type((*this)[n]);

operator[]提供更多信息:

if n >= size(), returns a reference to a std::sub_match representing an unmatched sub-expression (an empty subrange of the target sequence).

关于c++ - 什么是正则表达式中的不匹配匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52309609/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com