Match a sequence of characters against the midClauses of this pattern
169864
public boolean matchMiddle(char[] chars, int start, int end) {
    if (midClauses == null)
      return true;
    int[] cursor = new int[] {start, end};
    for (int i = 0; i < midClauses.length; i++) {
      Clause clause = midClauses[i];
      if (!find(clause, chars, cursor))
        return false;
    }
    return true;
  }
270517
function matchSchedule (value, sequence) {
    for (var i = 0, c = sequence.length; i < c; i++) {
      if (sequence[i] >= value) {
        return sequence[i] === value;
      }
    }

    return sequence[0] === value;
  }
626191
static final int match(String text, int pos, int ch) {
        if (pos < 0 || pos >= text.length()) {
            return -1;
        }
        pos = skipBidiMarks(text, pos);
        if (PatternProps.isWhiteSpace(ch)) {
            // Advance over run of white space in input text
            // Must see at least one white space char in input
            int s = pos;
            pos = skipPatternWhiteSpace(text, pos);
            if (pos == s) {
                return -1;
            }
            return pos;
        }
        if (pos >= text.length() || UTF16.charAt(text, pos) != ch) {
            return -1;
        }
        pos = skipBidiMarks(text, pos + UTF16.getCharCount(ch));
        return pos;
    }
557502
def match(self, filename, line, codes):
        """"""
        if self.regex_match_any(line, codes):
            if self._vary_codes:
                self.codes = tuple([codes[-1]])
            return True
46873
def match(self, context, line):
		""""""
		stripped = line.stripped
		return stripped.startswith('#') and not stripped.startswith('#{')
1270932
def matches(self, s):
    """"""
    regex_matches = self.compiled_regex.search(s) is not None
    return not regex_matches if self.inverted else regex_matches
1281808
def find_matches(text):
    
    """
    path = os.path.expanduser(text)
    if os.path.isdir(path) and not path.endswith('/'):
        return [ text + '/' ]

    pattern = path + '*'
    is_implicit_cwd = not (path.startswith('/') or path.startswith('./'))
    if is_implicit_cwd:
        pattern = './' + pattern
    rawlist = glob.glob(pattern)
    ret = []
    for fname in rawlist:
        if is_implicit_cwd:
            fname = fname[2:]
        if os.path.isdir(fname):
            ret.append(fname + '/')
        else:
            ret.append(fname)
    return ret
1219585
def match_subgroup(sequence, pattern):
    """"""

    for element in sequence:
        match = re.match(pattern, element)

        if match:
            yield match.groupdict()
649643
def match(pattern, data, **parse_kwargs):
    """"""
    return [m.value for m in parse(pattern, **parse_kwargs).find(data)]
282488
def matches_pattern(self, other):
        """"""
        matches = False
        if hasattr(other, 'addr'):
            if self.addr is None or other.addr is None:
                matches = True
            else:
                matches = self.addr == other.addr
        return matches
843140
function matches(patterns) {
  if (!Array.isArray(patterns)) {
    if (typeof patterns === 'string') {
      return patterns.indexOf('!') === 0 ? [] : glob.sync(patterns);
    } else {
      return [];
    }
  }
  let result = [];
  patterns.forEach((pattern) => {
    const exclusion = pattern.indexOf('!') === 0;
    if (exclusion) {
      pattern = pattern.slice(1);
    }
    const arr = glob.sync(pattern);
    if (exclusion) {
      result = difference(result, arr);
    } else {
      result = union(result, arr);
    }
  });
  return result;
}
316683
function matches(str, match) {
    if (Array.isArray(match)) return match.indexOf(str) > -1;
    return match.test(str);
}
876790
function match(input, patterns = []){
	if(!patterns || 0 === patterns.length)
		return false;
	
	input    = String(input);
	patterns = arrayify(patterns).filter(Boolean);
	for(const pattern of patterns)
		if((pattern === input && "string" === typeof pattern)
		|| (pattern instanceof RegExp) && pattern.test(input))
			return true;
	return false;
}
36388
def match(self, seq, **kwargs):
        '''
        '''
        strict = kwargs.get('strict', False)
        top_level = kwargs.get('top_level', True)
        match = kwargs.get('match', list())

        if top_level:
            kwargs['top_level'] = False
            kwargs['match'] = match

            try:
                seq = IterableList(seq)
                self.match(seq, **kwargs)

                if strict:
                    if not seq.empty():
                        raise MatchFailed('Sequence is too long', seq)

            except MatchFailed as e:
                return e.failure()

            return Match(*match)

        for elem in self.elems:
            elem.match(seq, **kwargs)
639999
def match_paren(self, tokens, item):
        """"""
        match, = tokens
        return self.match(match, item)
502420
def file_matches(filename, patterns):
    """"""
    return any(fnmatch.fnmatch(filename, pat)
               or fnmatch.fnmatch(os.path.basename(filename), pat)
               for pat in patterns)
748438
def file_matches_regexps(filename, patterns):
    """"""
    return any(re.match(pat, filename) for pat in patterns)