From https://en.cppreference.com/w/cpp/regex/match_results/str:
if
n >= size(), a string representing the unmatched match is returned.
What is this unmatched match?
The call is equivalent to
string_type((*this)[n]);
and operator[] gives more info:
if
n >= size(), returns a reference to astd::sub_matchrepresenting an unmatched sub-expression (an empty subrange of the target sequence).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With