def next_match(ary,start)
      if @firstresult
        @firstresult,result=nil,@firstresult
        assert ::Array===result.first.first
        return result
      end

   
      result,di,ri=@progress.last_next_match
      result or return @progress=nil      
      if result and ri==@reg.max_matches
        result=[@progress.clean_result,di]
        assert ::Array===result.first.first
        return result
      end
      

      (@progress and !@progress.matchset_stack.empty?) or return @progress=nil
      assert @progress.regsidx
      @progress.backtrack or return @progress=nil

      #need to adjust ri?

      #is this right... dunno...
      result,di,bogus=@progress.bt_match


      if result
        result=[@progress.clean_result,di]
        assert ::Array===result.first.first
        return result
      end
    end
def next_match(ary,start)
      if @firstresult
        @firstresult,result=nil,@firstresult
        assert ::Array===result.first.first
        return result
      end

   
      result,di,ri=@progress.last_next_match
      result or return @progress=nil      
      if result and ri==@reg.max_matches
        result=[@progress.clean_result,di]
        assert ::Array===result.first.first
        return result
      end
      

      (@progress and !@progress.matchset_stack.empty?) or return @progress=nil
      assert @progress.regsidx
      @progress.backtrack or return @progress=nil

      #need to adjust ri?

      #is this right... dunno...
      result,di,bogus=@progress.bt_match


      if result
        result=[@progress.clean_result,di]
        assert ::Array===result.first.first
        return result
      end
    end
(@reg=>progress.matcher,@matchary=>progress.huh,di=>progress.cursor.pos-@orig_pos)