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

标签 c++

来自 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/

相关文章:

c++ - decltype(auto) 和 decltype(returning expr) 作为返回类型有什么区别?

c++ - 如何找到从给定容器中抽出球的概率?

c++ - C++ 中的条件模板返回类型

c++ - 如何将任何 C++ 库添加到 Mac OS X

c++ - GetSaveFileName 失败并显示 CDERR_FINDRESFAILURE

c++ - cr2 提取具有特定焦距的图像

c++ - 如何从指针列表中获取随机指针?

c++ - VS 2012 C++ : Can I use source instead of symbols to debug?

C++ 多维数组生成段错误?

android - 在 CMake 中使用外部 C++ 库时出错