Try to find a match
13792
def _match_setters(self, query):
        
        q = query.decode('utf-8')
        for name, parser, response, error_response in self._setters:
            try:
                parsed = parser(q)
                logger.debug('Found response in setter of %s' % name)
            except ValueError:
                continue

            try:
                if isinstance(parsed, dict) and 'ch_id' in parsed:
                    self._selected = parsed['ch_id']
                    self._properties[name].set_value(parsed['0'])
                else:
                    self._properties[name].set_value(parsed)
                return response
            except ValueError:
                if isinstance(error_response, bytes):
                    return error_response
                return self._device.error_response('command_error')

        return None
1171810
function(matches, callback) {
      var inflight = matches.length;

      // return early if there is no fetching to be done
      if (!inflight) {
        return callback();
      }

      // wait for all subrequests to return
      var done = function() {
        if (--inflight === 0) {
          callback();
        }
      };

      // start fetching all subrequests
      var m, req, url;
      for (var i = 0; i < inflight; i++) {
        m = matches[i];
        url = m.url;
        req = this.cache[url];
        // if this url has already been requested, skip requesting it again
        if (!req) {
          req = this.xhr(url);
          req.match = m;
          this.cache[url] = req;
        }
        // wait for the request to process its subrequests
        req.wait(done);
      }
    }
805163
function matches(dom, selector) {
  return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector)
}
508391
def match(self, category, pattern):
        """"""

        return fnmatch.fnmatch(category, pattern, flags=self.FNMATCH_FLAGS)
649643
def match(pattern, data, **parse_kwargs):
    """"""
    return [m.value for m in parse(pattern, **parse_kwargs).find(data)]
458971
private boolean matchAtoms(Match match) {
        IAtom atom = match.getTargetAtom();
        if (match.getQueryNode().countNeighbors() > target.countNeighbors(atom)) {
            return false;
        }
        return match.getQueryNode().getAtomMatcher().matches(target, atom);
    }
1282110
def get_matching(content, match):
    
    if match != "":
        lines = [line for line in content.split("\n") if match in line]
        content = "\n".join(lines)
    return content
606769
def get_match(self, match_key, card_type="full_card"):
        

        match_url = self.api_path + "match/" + match_key + "/"
        params = {}
        params["card_type"] = card_type
        response = self.get_response(match_url, params)
        return response
987230
def match(path, search)
      matches = get_matches(path)

      if matches.length > 0
        match = matches.sort { |m| m[1] }.first

        @params = match[2]
        add_search_to_params(search)

        match[0]
      else
        nil
      end
    end
316744
public boolean matches(String target, Match match) {
		return this.matches(target, 0, target.length(), match);
	}
587061
def doFind(self, WHAT={}, SORT=[], SKIP=None, MAX=None, LOP='AND', **params):
		""""""

		self._preFind(WHAT, SORT, SKIP, MAX, LOP)

		for key in params:
			self._addDBParam(key, params[key])

		try:
			return self._doAction('-find')
		except FMServerError as e:
			if e.args[0] in [401, 8]:
				return []
813895
def find_one(line, lookup):
        
        match = re.search(lookup, line)
        if match:
            if match.group(1):
                return match.group(1)
        return False
188935
def match(tgt, opts=None):
    '''
    
    '''
    if not opts:
        opts = __opts__
    if not isinstance(tgt, six.string_types):
        return False

    return fnmatch.fnmatch(opts['id'], tgt)
232840
private @CheckForNull HashedToken searchMatch(@Nonnull String plainSecret) {
        byte[] hashedBytes = plainSecretToHashBytes(plainSecret);
        for (HashedToken token : tokenList) {
            if (token.match(hashedBytes)) {
                return token;
            }
        }
        
        return null;
    }
421782
function getMatches(str, re) {
  if (str == null) {
    return null;
  }
  if (re == null) {
    return null;
  }
  var results = [];
  var match;
  while ((match = re.exec(str)) !== null) {
    results.push(match[1]);
  }
  return results;
}
237275
public Match find(String text) {

		if (regexp == null)
			return null;

		Matcher m = regexp.matcher(text);
		if (m.find()) {
			Match match = new Match();
			match.setText(text);
			match.match = m;
			match.start = m.start(0);
			match.end = m.end(0);
			match.line = text;
			return match;
		}
		else {
			return null;
		}
	}
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