Returns true if specified value matches one of specified patterns.

@since 2.4
972713
public static boolean match(WildcardPattern[] patterns, String value) {
    for (WildcardPattern pattern : patterns) {
      if (pattern.match(value)) {
        return true;
      }
    }
    return false;
  }
138789
public static function matches($value, $pattern)
    {
        if (is_array($pattern)) {
            if (!is_array($value) && !$value instanceof \Traversable) {
                return false;
            }

            $keyMatcher = self::key_matcher($pattern);

            foreach ($value as $key => $item) {
                if (! $keyMatcher($key, $item)) return false;
            }

            if (! $keyMatcher()) return false;

            return true;
        }

        return self::matcher($value, $pattern);
    }
53986
private boolean wildcardMatch(Set<String> pValues, String pValue) {
        for (String pattern : pValues) {
            if (pattern.contains("*") && pValue.matches(pattern.replaceAll("\\*",".*"))) {
                return true;
            }
        }
        return false;
    }
1226597
public static final boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if ((value.length() < 3) || (value.length() > 20)) {
            return false;
        }
        return PATTERN.matcher(value.toString()).matches();
    }
825534
function matchArray(value, pattern, options) {
  if (!(value instanceof Array)) {
    return false;
  }
  if (!options.matchPartialArrays && pattern.length !== value.length) {
    return false;
  }
  if (pattern.length > value.length) {
    return false;
  }
  if (options.matchOutOfOrderArrays) {
    return pattern.every(
      (nestedMatch) => value.some(
        (nestedValue) => matchr(nestedValue, nestedMatch, options)
      )
    );
  }
  let valueIndex = 0;
  for (const nestedMatcher of pattern) {
    while (valueIndex < value.length && !matchr(value[valueIndex], nestedMatcher, options)) {
      valueIndex++;
    }
    if (valueIndex === value.length) {
      return false;
    }
  }
  return true;
}
1332178
private static boolean isMatch(List<ValueMatcher> matchers, int index, int value) {
		return (matchers.size() > index) ? matchers.get(index).match(value) : true;
	}
866369
public boolean matches(String string) {		
		Matcher matcher = pattern.matcher(string);
		boolean result = matcher.matches();
		return result;		
	}
974119
private function matchValue($value, $pattern)
    {
        // basic check
        if ($value == $pattern) {
            return true;
        }

        // simple check in case of optional param
        if ($pattern == '?') {
            return true;
        }

        // simple match in case pattern is just "*"
        if ($pattern == '*' && $value != '') {
            return true;
        }

        // more complex match in case when wildcard is part of a larger match
        $pattern = str_replace('*', '(.+)', $pattern);

        // regex match
        if (strpos($pattern, '(') !== false || strpos($pattern, '[') !== false || strpos($pattern, '\\') !== false) {
            return preg_match('#^' . $pattern . '$#', $value);
        }

        return false;
    }
1341687
boolean matches(final String path) {

        logger.debug("path to match: {}", path);

        if (excludedPaths.contains(path)) {
            return false;
        }

        for (Pattern pattern : excludedPatterns) {
            if (pattern.matcher(path).matches()) {
                return false;
            }
        }

        return true;
    }
870503
function is(pattern, value) {
    if (pattern == value) return true;

    pattern = regexQuote(pattern);

    // Asterisks are translated into zero-or-more regular expression wildcards
    // to make it convenient to check if the strings starts with the given
    // pattern such as "library/*", making any string check convenient.
    pattern = pattern.replace(/\\\*/g, '.*');
    pattern = new RegExp('^' + pattern + '$');

    return pattern.test(value);
}
1004789
public boolean match(final T value) throws MIDDException {
        for (Interval<T> interval : this.intervals) {
            if (interval.hasValue(value)) {
                return true;
            }
        }
        return false;
    }
1168107
private static boolean matchesPatternList(final String str, final List<Pattern> patterns) {
        if (patterns != null) {
            for (final Pattern pattern : patterns) {
                if (pattern.matcher(str).matches()) {
                    return true;
                }
            }
        }
        return false;
    }
118356
protected boolean isMatch(String value)
        {
        String filter = getFilterString();
        int    len    = filter.length();

        return value.regionMatches(m_ignoreCase, 0, filter, 0, len);
        }
1164497
@GwtIncompatible("java.util.regex.Pattern")
  public void containsMatch(Pattern regex) {
    if (!regex.matcher(actual()).find()) {
      failWithActual("expected to contain a match for", regex);
    }
  }
529731
def match(pattern):
    
    regex = re.compile(pattern)

    def validate(value):
        if not regex.match(value):
            return e("{} does not match the pattern {}", value, pattern)
    return validate
316744
public boolean matches(String target, Match match) {
		return this.matches(target, 0, target.length(), match);
	}
530895
public static boolean stringInPatterns(String s, List<Pattern> patterns) {
    for (Pattern pattern : patterns) {
      if (pattern.matcher(s).matches()) {
        return true;
      }
    }
    return false;
  }