match a series of regexes, setting any found values
771849
function(sMatch, text) {
      for (var i = 0; i < sMatch.matches.length; i++) {
        var r = sMatch.matches[i];
        var found = text.match(r);

        if (found) {
          var exact = found[0];
          var value = found[1].trim();
          var key = sMatch.fields[i];
          annoRows.push(annotations.createAnnotation({type: 'valueQuote', annotatedBy: sMatch.name, hasTarget: uri, key: key, value: value, ranges: annotations.createRange({ exact: exact, offset: found.index, selector: ''}) }));
        }
      }
      return annoRows;
    }
771102
function findFirstMatchingConfig (link, configs) {
  var i, config
  var href = link.attrs[link.attrIndex('href')][1]

  for (i = 0; i < configs.length; ++i) {
    config = configs[i]

    // if there is no pattern, config matches for all links
    // otherwise, only return config if href matches the pattern set
    if (!config.pattern || new RegExp(config.pattern).test(href)) {
      return config
    }
  }
}
1271809
def _match(self, regex):
        """"""
        cregex = re.compile(regex)
        for line in self.content.splitlines():
            match = cregex.match(line)
            if match:
                return match
        raise Exception('No "{0}" line in {1}.cpp'.format(
            regex_to_error_msg(regex),
            self.name
        ))
687546
def prep_regex(patterns):
    """"""

    flags = 0 if Config.options.case_sensitive else re.I

    return [re.compile(pattern, flags) for pattern in patterns]
599024
def match(self, tokens, item):
        """"""
        for flag, get_handler in self.matchers.items():
            if flag in tokens:
                return get_handler(self)(tokens, item)
        raise CoconutInternalException("invalid pattern-matching tokens", tokens)
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;
}
647894
function match(str, patterns) {
    var matched = false;
    if (!_.is(patterns, 'Array')) {
      patterns = [patterns];
    }
    patterns.every(function(pattern) {
      if (!pattern) {
        return true;
      }
      matched = matched || str.search(normalize(pattern)) > -1;
      return !matched;
    });
    return matched;
  }
847628
function(match, value, len) {
			var num = '' + value;
			if (lookAhead(match))
				while (num.length < len)
					num = '0' + num;
			return num;
		}
1373801
def getmatch(self, regex, group=0, flags=0):
    

    match = self.match(regex, flags)
    if match:
      return match.group(group)
    return None
706295
protected boolean check(String value, String regex) {
		Pattern pattern = Pattern.compile(regex);
		return pattern.matcher(value).matches();
	}
190842
def _iterative_matches(self, nodes):
        """"""
        nodelen = len(nodes)
        if 0 >= self.min:
            yield 0, {}

        results = []
        # generate matches that use just one alt from self.content
        for alt in self.content:
            for c, r in generate_matches(alt, nodes):
                yield c, r
                results.append((c, r))

        # for each match, iterate down the nodes
        while results:
            new_results = []
            for c0, r0 in results:
                # stop if the entire set of nodes has been matched
                if c0 < nodelen and c0 <= self.max:
                    for alt in self.content:
                        for c1, r1 in generate_matches(alt, nodes[c0:]):
                            if c1 > 0:
                                r = {}
                                r.update(r0)
                                r.update(r1)
                                yield c0 + c1, r
                                new_results.append((c0 + c1, r))
            results = new_results
1188596
def regxy(pattern, response, supress_regex, custom):
    """"""
    try:
        matches = re.findall(r'%s' % pattern, response)
        for match in matches:
            verb('Custom regex', match)
            custom.add(match)
    except:
        supress_regex = True
99393
public void setRegexes(String regexes) {
        String[] subPatterns = regexes.split(separate);
        this.regexes = new Pattern[subPatterns.length];
        for (int i = 0; i < subPatterns.length; ++i)
            this.regexes[i] = Pattern.compile(subPatterns[i]);
    }
414142
def matchall(r, s, flags=0):
    
    try:
        return [m.group(0) for m in matchiter(r, s, flags)]
    except ValueError:
        return None
872017
def match(self, pattern):
        """"""

        m = pattern.match(self._string, self._index)
        if m:
            self._index = m.end()
        return m
355396
def _fullmatch(pattern, text, *args, **kwargs):
    """"""
    match = re.match(pattern, text, *args, **kwargs)
    return match if match.group(0) == text else None
1286330
def get_value_matched_by_regex(field_name, regex_matches, string):
    """"""
    try:
        value = regex_matches.group(field_name)
        if value is not None:
            return value
    except IndexError:
        pass

    raise MissingFieldError(string, field_name)