diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp index 57a94fdd..d43422b0 100644 --- a/include/boost/regex/v4/perl_matcher_common.hpp +++ b/include/boost/regex/v4/perl_matcher_common.hpp @@ -565,7 +565,12 @@ bool perl_matcher::match_buffer_end() template bool perl_matcher::match_backref() { - // compare with what we previously matched: + // + // Compare with what we previously matched. + // Note that this succeeds if the backref did not partisipate + // in the match, this is in line with ECMAScript, but not Perl + // or PCRE. + // BidiIterator i = (*m_presult)[static_cast(pstate)->index].first; BidiIterator j = (*m_presult)[static_cast(pstate)->index].second; while(i != j)