Discard items that do not match the regex

 Usage (block, during initialization):
     Smoke.yql(:ruby) do
       ...
       emit do
         discard(:title, /tuesday/i)
       end
     end
 Discard must be used inside an `emit` block.
768903
def discard(key, matcher)
      @items.reject! {|i| (i[key] =~ matcher) ? true : false }
    end
622514
def reject!
      if block_given?
        return_nil = true
        @data.each do |k, v|
          if yield(k, v)
            @data.delete(k)
            return_nil = false
          end
        end
        return return_nil ? nil : self
      else
        return self.data.reject!
      end
    end
1142415
def discard_member(self, member, pipe=None):
        
        pipe = self.redis if pipe is None else pipe
        pipe.zrem(self.key, self._pickle(member))
41075
def delete(item)
      data = read_file
      match_name(item)
      data.delete(@@item)
      write_file(data)
    end
881353
def min_length_discard(records, min_length):
    
    logging.info('Applying _min_length_discard generator: '
                 'discarding records shorter than %d.', min_length)
    for record in records:
        if len(record) < min_length:
            logging.debug('Discarding short sequence: %s, length=%d',
                record.id, len(record))
        else:
            yield record
934911
def discard(self, value):
        
        _set = self._set
        if value in _set:
            _set.remove(value)
            self._list.discard(value)
100009
function discard (bboxes, exclude = null) {
    if (this.obb) { // single collision box
        return Label.prototype.occluded.call(this, bboxes, exclude);
    }
    else if (this.obbs) { // mutliple collision boxes
        for (let i = 0; i < this.obbs.length; i++){
            let aabb = this.aabbs[i];
            let obb = this.obbs[i];
            let obj = { aabb, obb };

            let should_discard = Label.prototype.occluded.call(obj, bboxes, exclude);
            if (should_discard) {
                return true;
            }
        }
    }
    return false;
}
200525
def lint
      lint_results
        .reject { |r| r.nil? || r['messages'].length.zero? }
        .reject { |r| r['messages'].first['message'].include? 'matching ignore pattern' }
        .map { |r| send_comment r }
    end
395591
private void discardReadBytesIfNecessary(ByteBuf buffer) {

        float usedRatio = (float) buffer.readerIndex() / buffer.capacity();

        if (usedRatio >= discardReadBytesRatio && buffer.refCnt() != 0) {
            buffer.discardReadBytes();
        }
    }
672748
def reject(&blk)
      if block_given?
        Thresholds.new(@thresholds.reject(&blk))
      else
        Thresholds.new(@thresholds.reject)
      end
    end
149144
def pop_discard_buffer
      raise Shells::NotRunning unless running?
      # a standard pop discarding current data and retrieving the history.
      debug 'Discarding buffer <<'
      sync do
        hist_stdout, hist_stderr, hist_output = (output_stack.pop || [])
        self.stdout = hist_stdout || ''
        self.stderr = hist_stderr || ''
        self.output = hist_output || ''
      end
    end
129131
def ignore(self, matcher):
        '''
         
        '''
        events  = self.eventtree.findAndRemove(matcher)
        for e in events:
            self.queue.unblock(e)
            e.canignore = True
363504
def exclude(self, twig=None, check_visible=True, **kwargs):
        
        return self - self.filter(twig=twig,
                                  check_visible=check_visible,
                                  **kwargs)
344395
def delete_all(val = nil, &block)
      each_node.select(&__to_matcher(val, &block)).each do |node_to_delete|
        next unless node_to_delete
        __unlink_node(node_to_delete)
      end.map(&:data)
    end
349973
def delete(path: nil, payload: nil, headers: {}, query: {})
      execute(method: :delete, path: path, headers: headers, query: query, payload: payload)
    end
1219634
function discard_callsite(err, matcher){
  // Some JS environments do not have a
  // stack property on error objects.
  // If we are in such an environment
  // just return err as-is.
  if (err.stack) {
    err.stack = err.stack
      .split('\n')
      .filter(function(frame_str){
        return !matcher.test(frame_str);
      })
      .join('\n');
  }
  return err;
}
1106055
def except(*keys)
      self.reject { |k,v| keys.include?(k || k.to_sym) }
    end