Validate if the given value matches the pattern
@param pattern The pattern
@param value The value
@return true if value matches pattern
767865
public static boolean matches(String pattern, String value) {
        Pattern p = Pattern.compile(pattern);
        Matcher m = p.matcher(value);
        return m.matches();
    }
1162705
private static function validateRegex($value, $pattern, Validator $validator)
    {
        if (!is_string($value) || preg_match($pattern, $value) === 1) {
            return null;
        }

        return error('The value {data} must match the format {parameter}.', $validator);
    }
1260769
public boolean find(Pattern pattern)
    {
        matcher.usePattern(pattern);
        int start = matcher.regionStart();
        if (matcher.find())
        {
            stack.add(new MatchResultImpl(matcher));
            matcher.region(matcher.end(), matcher.regionEnd());
            return true;
        }
        else
        {
            return false;
        }
    }
650601
private final boolean matchPattern(byte[][] patterns, int bufferIndex)
   {
      boolean match = false;
      for (byte[] pattern : patterns)
      {
         int index = 0;
         match = true;
         for (byte b : pattern)
         {
            if (b != m_buffer[bufferIndex + index])
            {
               match = false;
               break;
            }
            ++index;
         }
         if (match)
         {
            break;
         }
      }
      return match;
   }
912622
private boolean matchLemmaRegexp(AnalyzedTokenReadings aToken,
      Pattern pattern) {
    boolean matches = false;
    for (AnalyzedToken analyzedToken : aToken) {
      final String posTag = analyzedToken.getLemma();
      if (posTag != null) {
        final Matcher m = pattern.matcher(posTag);
        if (m.matches()) {
          matches = true;
          break;
        }
      }
    }
    return matches;
  }
972713
public static boolean match(WildcardPattern[] patterns, String value) {
    for (WildcardPattern pattern : patterns) {
      if (pattern.match(value)) {
        return true;
      }
    }
    return false;
  }
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;
        }
    }
976286
public static boolean isSbeJavaName(final String value)
    {
        for (final String token : PATTERN.split(value, -1))
        {
            if (isJavaIdentifier(token))
            {
                if (isJavaKeyword(token))
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }

        return true;
    }
902131
public CharSequence matchesPattern(final CharSequence input, final String pattern, final String message) {
        if (!Pattern.matches(pattern, input)) {
            fail(message);
        }
        return input;
    }
1332178
private static boolean isMatch(List<ValueMatcher> matchers, int index, int value) {
		return (matchers.size() > index) ? matchers.get(index).match(value) : true;
	}
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);
    }
706295
protected boolean check(String value, String regex) {
		Pattern pattern = Pattern.compile(regex);
		return pattern.matcher(value).matches();
	}
1081948
public boolean hasIgnoringCase(String value)
    {
        if (values.isEmpty())
        {
            return false;
        }
        value = value.toLowerCase();
        for (String v : values)
        {
            if (v.toLowerCase().equals(value))
            {
                return true;
            }
        }
        return false;
    }
530005
function (value, pattern) {
        try {
            checkSubtree(value, pattern);
            return true;
        } catch (e) {
            if (e instanceof Match.Error)
                return false;
            // Rethrow other errors.
            throw e;
        }
    }
648503
public static BooleanBinding matches(final ObservableValue<String> text, final String pattern) {
		return Bindings.createBooleanBinding(() -> {
			final String textToVerify = text.getValue();
			return textToVerify != null && textToVerify.matches(pattern);
		}, text);
	}
260449
private void checkConformsToRegexes(String value) {
        //Not checking the datatype because the regex will always be null for non strings.
        this.sups().forEach(sup -> {
            String regex = sup.regex();
            if (regex != null && !Pattern.matches(regex, value)) {
                throw TransactionException.regexFailure(this, value, regex);
            }
        });
    }
866369
public boolean matches(String string) {		
		Matcher matcher = pattern.matcher(string);
		boolean result = matcher.matches();
		return result;		
	}