class Match

Match result. Single element of array, returned by [[LinkifyIt#match]]
5508
function Match(self, shift) {
  var start = self.__index__,
      end   = self.__last_index__,
      text  = self.__text_cache__.slice(start, end);

  /**
   * Match#schema -> String
   *
   * Prefix (protocol) for matched string.
   **/
  this.schema    = self.__schema__.toLowerCase();
  /**
   * Match#index -> Number
   *
   * First position of matched string.
   **/
  this.index     = start + shift;
  /**
   * Match#lastIndex -> Number
   *
   * Next position after matched string.
   **/
  this.lastIndex = end + shift;
  /**
   * Match#raw -> String
   *
   * Matched string.
   **/
  this.raw       = text;
  /**
   * Match#text -> String
   *
   * Notmalized text of matched string.
   **/
  this.text      = text;
  /**
   * Match#url -> String
   *
   * Normalized url of matched string.
   **/
  this.url       = text;
}
1116210
def get_match(self, match_id):
        """"""
        return self._make_req(endpoints.MATCH, dict(
            k=self.key,
            mp=match_id), Match)
1217914
def is_match(self, match):
        
        result = False
        if self == match:
            result = True
        elif isinstance(match, str) and fnmatchcase(self.name, match):
            result = True  # Found by instance or name
        return result
1093308
def match(self, models, results, relation):
        
        return self.match_one(models, results, relation)
316683
function matches(str, match) {
    if (Array.isArray(match)) return match.indexOf(str) > -1;
    return match.test(str);
}
882304
def match(self, item):
        
        val = (getattr(item, self._name) or '').lower()
        result = self._matcher(val) if self._is_regex else self._matcher(val, item)
        if 0:
            log.debug("%r for %r ~ %r, name %r, item %r" % (
                result, val, self._value, self._name, item))
        return result
1062933
def selector_matches?(selector)
      selector.any? do |group|
        group.keys.all? do |key|
          input_has_key?(key) && (@input[key] == group[key] || group[key].nil?)
        end
      end
    end
1373801
def getmatch(self, regex, group=0, flags=0):
    

    match = self.match(regex, flags)
    if match:
      return match.group(group)
    return None
734673
def match_spaces
      stack = []
      matched = match_space
      while matched != :failed
        stack << matched
        matched = match_space
      end
      stack
    end
369563
def match_node(node,expected,label)
        
        #check type 
        if !check_type(node,expected['type'],label,expected['ok_empty'])
          @errors.push('Error: node ' + label + ' is not of an accepted type. Should be one of ' + expected['accepts'].join(', '))
          return false
        end
        
        if (node.kind_of?(Hash) || node.kind_of?(Array))
          
          if node.empty? && !expected['ok_empty']
            @errors.push('Error: node ' + label + ' cannot be empty')
            return false
          elsif !node.empty? && expected.has_key?('accepts')
            valid_content = false
            
            if node.kind_of?(Hash)
              matched = []
              unmatched = []
              node.each_pair{
                |key,value|
                
                expected['accepts'].each{
                  |accepts|
                     
                  result = check_type(value,accepts,key)
                  
                  if result
                    matched.push(key)
                    if !unmatched.find_index(key).nil?
                      unmatched.slice(unmatched.find_index(key))
                    end
                    break
                  else
                    unmatched.push(key)
                  end
                 
                }
                
              }
                   
              if(matched.count==node.count)
                valid_content = true
               else
                unmatched.each{
                  |node|
                  
                  @errors.push('Error: node ' + node + ' is not of an accepted type. Should be one of ' + expected['accepts'].join(', '))
                }
              end
              
            elsif node.kind_of?(Array)
              matched = []
              unmatched = []
              node.each_index{
                |n|
                
                expected['accepts'].each{
                  |accepts|
                  
                  key = label + '[' + n.to_s + ']'
                  result = check_type(node[n],accepts,key)
                  
                  if result
                    
                    matched.push(key)
                    if !unmatched.find_index(key).nil?
                      unmatched.slice(unmatched.find_index(key))
                    end
                    break
                  else
                    unmatched.push(key)
                  end
                  
                }
              }
              
              if(matched.count==node.count)
                valid_content = true
              else
                unmatched.each{
                  |node|
                  
                  @errors.push('Error: node ' + node + ' is not of an accepted type. Should be one of ' + expected['accepts'].join(', '))
                }
              end
            
            end
            
            if !valid_content
              @errors.push('Error: node ' + label + ' contains an unaccepted type.')
              return false
            end
         end
         
        end
       
        return true
                
      end
67251
function match( o, p, strict ) {

        var o_type = get_type( o ),
            p_type = get_type( p );

        if ( strict ) {

            // In strict mode, objects must have the same type
            if ( o_type !== p_type ) { return false; }

            switch( o_type ) {

                case 'array':
                    return match_arrays( o, p, true );

                case 'boolean':
                    return o === p;

                case 'nan':
                case 'null':
                case 'undefined':
                    return true;

                case 'function':
                case 'number':
                case 'regexp':
                case 'string':
                    return o.toString() === p.toString();

                case 'object':
                    return match_objects( o, p, true );

            }

        } else {

            switch( p_type ) {

                case 'array':
                    return o_type === 'array'
                                ? match_arrays( o, p, false )
                                : false;

                case 'boolean':
                case 'number':
                case 'string':
                    return p == o;

                case 'function':
                    return !!p( o );

                case 'nan':
                    return isNaN( o );

                case 'null':
                case 'undefined':
                    return o_type === p_type;

                case 'object':
                    return o_type === 'object'
                                ? match_objects( o, p, false )
                                : false;

                case 'regexp':
                    return o_type === 'string' && p.test( o );

            }

        }

    }
126325
def match!(message)
      params = {}
      args = []
      @conditions.each do |condition|
        if result = condition.match(message)
          params.merge!(result[0])
          args += result[1]
        else
          return nil
        end
      end
      { :block => @block, :klass => @klass, :params => params, :args => args }
    end
91512
def matches?(object)
      methods.all? { |method| object.respond_to?(method) }
    rescue NoMethodError
      false
    end
1032164
def match?
      predicate.is_a?(Predicated::Equal) &&
              arrayish?(predicate.left) &&
              arrayish?(predicate.right)
    end
1154411
def matches(self, regex, flags=0):
        
        return self._generate_test(
            lambda value: re.match(regex, value, flags),
            ('matches', self._path, regex)
        )
185176
def _find_match(ele, lst):
    '''
    
    '''
    for _ele in lst:
        for match_key in _MATCH_KEYS:
            if _ele.get(match_key) == ele.get(match_key):
                return ele
178318
def match(self, item):
        
        result = self._value == getattr(item, self._name)
        #log.debug("%r for %r = %r, name %r, item %r" % (
        #    result, getattr(item, self._name), self._value, self._name, item))
        return result