来自 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 astd::sub_match
representing an unmatched sub-expression (an empty subrange of the target sequence).
关于c++ - 什么是正则表达式中的不匹配匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52309609/