Fails if the string contains a match on the given regex.
439374
@GwtIncompatible("java.util.regex.Pattern")
  public void doesNotContainMatch(Pattern regex) {
    Matcher matcher = regex.matcher(actual());
    if (matcher.find()) {
      failWithoutActual(
          fact("expected not to contain a match for", regex),
          fact("but contained", matcher.group()),
          fact("full string", actualCustomStringRepresentationForPackageMembersToCall()));
    }
  }
1373801
def getmatch(self, regex, group=0, flags=0):
    

    match = self.match(regex, flags)
    if match:
      return match.group(group)
    return None
132313
def ismatch(text, pattern):
    """"""

    if hasattr(pattern, 'search'):
        return pattern.search(text) is not None
    else:
        return pattern in text if Config.options.case_sensitive \
            else pattern.lower() in text.lower()
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;
  }
209076
def match_regex_list(patterns, string):
    """"""

    for p in patterns:

        if re.findall(p, string):
            return True

    return False
1144496
public boolean match(String str, String regex) {
		if (str == null || regex == null)
			return false;
		if (regex.trim().isEmpty())
			return true;
		return Pattern.compile(regex.trim()).matcher(str).find();
	}
926321
def _process_regex(cls, regex, rflags, state):
        """"""
        if isinstance(regex, Future):
            regex = regex.get()
        return re.compile(regex, rflags).match
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
614996
function matches(regex, str) {
    var ret = [];
    var match = regex.exec(str);
    while (match !== null) {
        ret.push({
            full: match[0],
            inner: match[1]
        });
        match = regex.exec(str);
    }
    return ret;
}
952384
public void logMatchesFound(String regex){
		if (uniqueTextViews.size() > 0) {
			Log.d(LOG_TAG, " There are only " + uniqueTextViews.size() + " matches of '" + regex + "'");
		}
		else if(webElements.size() > 0){
			Log.d(LOG_TAG, " There are only " + webElements.size() + " matches of '" + regex + "'");
		}
		uniqueTextViews.clear();
		webElements.clear();
	}
317672
def regex_match_any(self, line, codes=None):
        """"""
        for selector in self.regex_selectors:
            for match in selector.regex.finditer(line):
                if codes and match.lastindex:
                    # Currently the group name must be 'codes'
                    try:
                        disabled_codes = match.group('codes')
                    except IndexError:
                        return True

                    disabled_codes = _stripped_codes(disabled_codes)

                    current_code = codes[-1]

                    if current_code in disabled_codes:
                        return True
                else:
                    return True
        return False
1047046
public static String match(String pattern, String reg) {

        String match = null;
        List<String> matches = match(pattern, reg, 0);
        if (null != matches && matches.size() > 0) {
            match = matches.get(0);
        }
        return match;
    }
1229864
public static boolean safeRegexMatch(String pattern, String value) {
        if (StringUtils.isNotBlank(pattern)) {
            if (value == null) {
                return false;
            } else {
                try {
                    return Pattern.matches(pattern, value);
                } catch (PatternSyntaxException ex) {
                    return false;
                }
            }
        } else {
            return false;
        }
    }
1275902
public static boolean nameMatch(String regex, String name) {
		if (regex == null || regex.length() == 0 || name == null || name.length() == 0)
			return false;
		if ('*' == (regex.charAt(0))) {
			return name.endsWith(regex.substring(1));
		} else if (regex.endsWith("*")) {
			return name.startsWith(regex.substring(0, regex.length() - 1));
		} else {
			int starPos = regex.indexOf('*');
			if (-1 == starPos)
				return regex.equals(name);
			return name.startsWith(regex.substring(0, starPos)) && name.endsWith(regex.substring(starPos + 1));
		}
	}
546201
public void contains(CharSequence string) {
    checkNotNull(string);
    if (actual() == null) {
      failWithActual("expected a string that contains", string);
    } else if (!actual().contains(string)) {
      failWithActual("expected to contain", string);
    }
  }
253058
function containsSingleMatch(str, arr) {
  var filtered = arr.filter(function(e) { return e.indexOf(str) === 0 })
  return filtered.length === 1
}
273112
def match_check(self, regex, fun):
        '''
        
        '''
        vals = []
        if isinstance(fun, six.string_types):
            fun = [fun]
        for func in fun:
            try:
                if re.match(regex, func):
                    vals.append(True)
                else:
                    vals.append(False)
            except Exception:
                log.error('Invalid regular expression: %s', regex)
        return vals and all(vals)