module RuboCop::Cop::MatchRange

def match_range(range, match)

For a `match` inside `range`, return a new `Range` covering the match
def match_range(range, match)
  range_between(range.begin_pos + match.begin(1), range.begin_pos + match.end(1))
end