diff --git a/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/include/boost/regex/v4/perl_matcher_non_recursive.hpp index 791c5d93..c055b383 100644 --- a/include/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -1066,6 +1066,8 @@ bool perl_matcher::unwind_slow_dot_repeat(bool { // can't repeat any more, remove the pushed state: destroy_single_repeat(); + if((m_match_flags & match_partial) && (position == last) && (position != search_base)) + m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } @@ -1118,6 +1120,8 @@ bool perl_matcher::unwind_fast_dot_repeat(bool { // can't repeat any more, remove the pushed state: destroy_single_repeat(); + if((m_match_flags & match_partial) && (position == last) && (position != search_base)) + m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } @@ -1182,6 +1186,8 @@ bool perl_matcher::unwind_char_repeat(bool r) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); + if((m_match_flags & match_partial) && (position == last) && (position != search_base)) + m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } @@ -1246,6 +1252,8 @@ bool perl_matcher::unwind_short_set_repeat(bool { // can't repeat any more, remove the pushed state: destroy_single_repeat(); + if((m_match_flags & match_partial) && (position == last) && (position != search_base)) + m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } @@ -1311,6 +1319,8 @@ bool perl_matcher::unwind_long_set_repeat(bool { // can't repeat any more, remove the pushed state: destroy_single_repeat(); + if((m_match_flags & match_partial) && (position == last) && (position != search_base)) + m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; }