class RuboCop::Cop::Performance::RegexpMatch
def find_last_match(body, range, scope_root)
def find_last_match(body, range, scope_root) last_matches(body).find do |ref| ref_pos = ref.source_range.begin_pos range.cover?(ref_pos) && scope_root(ref) == scope_root end end