Returns True if the pattern matches the string
498319
def match(self, string):
        """"""
        if self.casesensitive:
            return fnmatch.fnmatch(string, self.pattern)
        else:
            return fnmatch.fnmatch(string.lower(), self.pattern.lower())
66296
private static boolean match(String regExp, String userInput) {
        Pattern pattern = Pattern.compile(regExp);
        Matcher matcher = pattern.matcher(userInput);
        if (matcher.find())
            return true;
        else
            return false;
    }
701098
private static boolean matchesNameOrWildcard(String pattern, String s) {
        return "*".equals(pattern) || Objects.equal(pattern, s);
    }
104957
public static boolean matches(Pattern patternMatcher, Object... elements)
    {
        if (patternMatcher == null) {
            return true;
        }

        for (Object element : elements) {
            if (matches(patternMatcher, element)) {
                return true;
            }
        }

        return false;
    }
500417
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) {
        if (msg.getResponseHeader().isEmpty()) {
            return false;
        }

        String val = msg.getResponseHeader().getHeader(header);
        if (val == null) {
            return false;
        }

        Matcher matcher = pattern.matcher(val);
        return matcher.find();
    }
706786
protected boolean verifyPatternMatch(String text) {
		if (this.expectedPattern == null) {
			return false;
		}
		return this.expectedPattern.matcher(text).matches();
	}
519501
def in_string(objet, pattern):
        
        return bool(re.search(pattern, str(objet), flags=re.I)) if objet else False
1207121
boolean match(String candidate) {
    char[] chars = candidate.toCharArray();
    int[] cursor = new int[] {0, chars.length};
    if (!checkPrefix(chars, cursor))
      return false;
    if (prefix == suffix && midClauses == null)
      // The pattern consists only of the prefix, which must exhaust the string
      return cursor[0] == cursor[1];
    if (!checkSuffix(chars, cursor))
      return false;
    return matchMiddle(chars, cursor[0], cursor[1]);
  }
165559
def match(self, filepath):
        
        for pattern in self.__pattern:
            if len(fnmatch.filter([filepath], pattern)) > 0:
                return True
        return False
219855
def match(pattern, name):
    # type: (Text, Text) -> bool
    
    try:
        re_pat = _PATTERN_CACHE[(pattern, True)]
    except KeyError:
        res = "(?ms)" + _translate(pattern) + r'\Z'
        _PATTERN_CACHE[(pattern, True)] = re_pat = re.compile(res)
    return re_pat.match(name) is not None
790691
def pattern_match(pattern, string):
    
    def backtrack(pattern, string, dic):

        if len(pattern) == 0 and len(string) > 0:
            return False

        if len(pattern) == len(string) == 0:
            return True

        for end in range(1, len(string)-len(pattern)+2):
            if pattern[0] not in dic and string[:end] not in dic.values():
                dic[pattern[0]] = string[:end]
                if backtrack(pattern[1:], string[end:], dic):
                    return True
                del dic[pattern[0]]
            elif pattern[0] in dic and dic[pattern[0]] == string[:end]:
                if backtrack(pattern[1:], string[end:], dic):
                    return True
        return False

    return backtrack(pattern, string, {})
478166
def compare(self, origin, pattern):
        

        if origin is None or pattern is None:
            return False
        return re.match(pattern, origin) is not 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()
79373
def match(self, string):
        """"""
        if self.casesensitive:
            return self.pattern == os.path.normcase(string)
        else:
            return self.pattern.lower() == os.path.normcase(string).lower()
251159
def _is_pattern_match(re_pattern, s):
    """"""
    match = re.match(re_pattern, s, re.I)
    return match.group() == s if match else False
628620
public static boolean find(final String pattern, final String string) {
        return createPattern(pattern, Pattern.CASE_INSENSITIVE).matcher(string).find();
    }
612492
boolean matches(String value) {
    if (pattern == null) {
      return true;
    }
    return pattern.matcher(value).matches();
  }