Matches an extension in a case insensitive way.

@param patternMatcher the pattern to match
@param filters the filters
@param extension the extension to match
@return false if one of the filter is not matching the extension
@since 7.0M2
193508
public static boolean matches(Pattern patternMatcher, Collection<Filter> filters, Extension extension)
    {
        if (matches(patternMatcher, extension.getId().getId(), extension.getDescription(), extension.getSummary(),
            extension.getName(), ExtensionIdConverter.toStringList(extension.getExtensionFeatures()))) {
            for (Filter filter : filters) {
                if (!matches(filter, extension)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
758392
public boolean isPrefixPatternString() {
        String patternString = getValue();
        int length = patternString.length();
        if (length == 0) {
            return false;
        }
        // '_' is not allowed.
        int disallowedWildcardPos = patternString.indexOf('_');
        if (disallowedWildcardPos != -1) {
            return false;
        }
        int firstWildcardPos = patternString.  indexOf('%');
        // Indexable filters have only a trailing '%'.
        // NOTE: not bothering to check for silly synonym patterns with multiple trailing '%'s.
        if (firstWildcardPos != length-1) {
            return false;
        }
        return true;
    }
718602
public static Predicate<String> matchesRegex(final String regex) {
		final Pattern pattern = Pattern.compile(regex);
		return matchesRegex(pattern);
	}
399109
public List<Row> search(ExtendedFilter filter)
    {
        SecondaryIndexSearcher mostSelective = getHighestSelectivityIndexSearcher(filter.getClause());
        if (mostSelective == null)
            return Collections.emptyList();
        else
            return mostSelective.search(filter);
    }
1072476
public ResultMatcher matches(final Matcher<?> matcher) {
        return new AbstractResultMatcher(path, configuration) {
            public void doMatch(Object actual) {
                isPresent(actual);
                Node node = getNode(actual);
                assertThat("Node \"" + path + "\" does not match.", node.getValue(), (Matcher<? super Object>) matcher);
            }
        };

    }
717078
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException {
        for (TypeFilter filter : ENTITY_TYPE_FILTERS) {
            if (filter.match(reader, readerFactory)) {
                return true;
            }
        }
        return false;
    }
724599
private boolean containsNumericMatcher(String matcherExpression) {
        for (String numericMatcher : numericMatchers) {
            if (matcherExpression.contains(numericMatcher)) {
                return true;
            }
        }

        return false;
    }
1322754
public boolean matchesFilter(String filter) {

        filter = filter.toLowerCase();
        return m_title.toLowerCase().contains(filter) || m_path.toLowerCase().contains(filter);
    }
655847
protected boolean match(final URI uri) {

        final String methodName = "match";
        final String uriStr = prepareUri(uri);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName, this, uriStr, ignoreCase, wildcard);
        }

        if (this.matcher == null) {
            if (ignoreCase) {
                if (pattern.equalsIgnoreCase(uriStr)) {
                    return true;
                }
                if (wildcard && uriStr.toLowerCase().startsWith(pattern)) {
                    return true;
                }
            } else {
                if (pattern.equals(uriStr)) {
                    return true;
                }
                if (wildcard && uriStr.startsWith(pattern)) {
                    return true;
                }
            }
        } else {
            return this.matcher.matcher(uriStr).matches();
        }

        return false;
    }
388130
public <E extends Exception> boolean anyMatch(Try.CharPredicate<E> filter) throws E {
        return anyMatch(0, size(), filter);
    }
325125
public <E extends Exception> boolean allMatch(Try.CharPredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
1214640
@GwtIncompatible("java.util.regex.Pattern")
  public void matches(Pattern regex) {
    if (!regex.matcher(actual()).matches()) {
      failWithActual("expected to match", regex);
    }
  }
45620
public static <S> Matcher<S> is(Matcher<S> matcher) {
        return Matchers.is(matcher);
    }
1164497
@GwtIncompatible("java.util.regex.Pattern")
  public void containsMatch(Pattern regex) {
    if (!regex.matcher(actual()).find()) {
      failWithActual("expected to contain a match for", regex);
    }
  }
227383
public <E extends Exception> boolean allMatch(Try.BytePredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
976394
@NotNull
  List<RuleMatch> getFilteredExtensionMatches(List<RuleMatch> matches, List<RemoteRuleMatch> extensionMatches) {
    List<RuleMatch> filteredExtMatches = new ArrayList<>();
    for (RemoteRuleMatch extensionMatch : extensionMatches) {
      if (!extensionMatch.isTouchedByOneOf(matches)) {
        AnalyzedSentence sentence = new AnalyzedSentence(new AnalyzedTokenReadings[]{});
        HiddenRule hiddenRule = new HiddenRule(extensionMatch.getLocQualityIssueType().orElse(null), extensionMatch.estimatedContextForSureMatch());
        RuleMatch hiddenRuleMatch = new RuleMatch(hiddenRule, sentence, extensionMatch.getErrorOffset(),
                extensionMatch.getErrorOffset()+extensionMatch.getErrorLength(), "(hidden message)");
        filteredExtMatches.add(hiddenRuleMatch);
      }
    }
    return filteredExtMatches;
  }
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;
        }
    }