Match against the passed string.
Case is ignored if the ignoreCase flag is set.
@param match
@param textProvider
@return true if matched
518186
public boolean exactOrError(String match,TextProvider textProvider) 
    {
        if (!exact(match,textProvider,false))
        {
            throw new ParserException("Expected "+match,textProvider);
        }
        return true;
    }
381919
public T match(OfInt text)
    {
        if (root == null)
        {
            throw new IllegalStateException("not compiled");
        }
        while (text.hasNext())
        {
            switch (match(text.nextInt()))
            {
                case Error:
                    return null;
                case Match:
                    return getMatched();
            }
        }
        return null;
    }
91248
public boolean containsString (String text)
    {
        for (int ii = 0, nn = _lines.size(); ii < nn; ii++) {
            // don't look inside the autogenerated areas
            if (!(ii >= _nstart && ii < _nend) && !(ii >= _mstart && ii < _mend) &&
                    _lines.get(ii).contains(text)) {
                return true;
            }
        }
        return false;
    }
1137950
public static boolean matches(PrecedencedSelfDescribing self, Matcher<?> matcher, Object item, Description mismatch) {
        boolean paren = useParen(self, matcher);
        if (paren) {
            return QuickDiagnose.matches(matcher, item, mismatch, "($1)");
        } else {
            return QuickDiagnose.matches(matcher, item, mismatch);
        }
    }
1191997
public static boolean containsWord(final String text, final String word) {

    if (text == null || word == null) {
      return false;
    }
    if (text.contains(word)) {
      Matcher matcher = matchText(text);
      for (; matcher.find();) {
        String matchedWord = matcher.group(0);
        if (matchedWord.equals(word)) {
          return true;
        }
      }
    }
    return false;
  }
79659
@Override
    public boolean matches(String fileName) {
        // Special case: if no classes or packages have been defined,
        // then the screener matches all class files.
        if (patternList.isEmpty()) {
            return true;
        }

        LOG.debug("Matching: {}", fileName);

        // Scan through list of regexes
        for (Matcher matcher : patternList) {
            matcher.reset(fileName);
            if (matcher.find()) {
                LOG.debug("\\tTrying [{}]: yes!", matcher.pattern());
                return true;
            }
            LOG.debug("\\tTrying [{}]: no", matcher.pattern());
        }
        return false;
    }
1316290
public static boolean caseIgnoreMatch(String s1, String s2) {
        if (s1 == s2) {
            return true;
        }

        int len = s1.length();
        if (len != s2.length()) {
            return false;
        }

        for (int i = 0; i < len; i++) {
            char c1 = s1.charAt(i);
            char c2 = s2.charAt(i);
            if (c1 != c2 && toLower(c1) != toLower(c2)) {
                return false;
            }
        }
        return true;
    }
1095545
static Matcher ignoreCase(Matcher matcher) {
    if (matcher instanceof CharClassMatcher) {
      CharClassMatcher m = matcher.as();
      return new CharClassMatcher(m.set(), true);
    } else if (matcher instanceof CharSeqMatcher) {
      CharSeqMatcher m = matcher.as();
      return new CharSeqMatcher(m.pattern(), true);
    } else if (matcher instanceof IndexOfMatcher) {
      IndexOfMatcher m = matcher.as();
      return new IndexOfMatcher(m.pattern(), m.next(), true);
    } else if (matcher instanceof StartsWithMatcher) {
      StartsWithMatcher m = matcher.as();
      return new StartsWithMatcher(m.pattern(), true);
    } else {
      return matcher;
    }
  }
829202
private boolean containsIgnoreCase(List<String> stringlist, String match) {
		for (String s : stringlist) {
			if (s.equalsIgnoreCase(match)) {
				return true;
			}
		}
		return false;
	}
1168480
public static boolean isMatched(String pattern, String reg) {
        Pattern compile = Pattern.compile(reg);
        return compile.matcher(pattern).matches();
    }
72306
private static boolean matchRuleRegex(String regex, String value) {

        if (value == null) {
            value = "";
        }

        if (regex == null) {
            return true;
        }
        if ((regex.length() > 0) && (regex.charAt(0) == '!')) {
            return !value.matches(regex.substring(1));
        } else {
            return value.matches(regex);
        }
    }
325020
static final int match(String text, int pos, String str) {
        for (int i = 0; i < str.length() && pos >= 0;) {
            int ch = UTF16.charAt(str, i);
            i += UTF16.getCharCount(ch);
            if (isBidiMark(ch)) {
                continue;
            }
            pos = match(text, pos, ch);
            if (PatternProps.isWhiteSpace(ch)) {
                i = skipPatternWhiteSpace(str, i);
            }
        }
        return pos;
    }
525040
public boolean match(String word) {
        int flags = 0;
        if (ignoreCase) {
            flags = flags | Pattern.CASE_INSENSITIVE;
        }
        return Pattern.compile(pattern, flags).matcher(word).find();
    }
767865
public static boolean matches(String pattern, String value) {
        Pattern p = Pattern.compile(pattern);
        Matcher m = p.matcher(value);
        return m.matches();
    }
150440
public char match(ISense source, ISense target) throws MatcherLibraryException {
        int Equals = 0;
        int moreGeneral = 0;
        int lessGeneral = 0;
        int Opposite = 0;
        String sSynset = source.getGloss();
        String tSynset = target.getGloss();
        StringTokenizer stSource = new StringTokenizer(sSynset, " ,.\"'()");
        String lemmaS, lemmaT;
        while (stSource.hasMoreTokens()) {
            StringTokenizer stTarget = new StringTokenizer(tSynset, " ,.\"'()");
            lemmaS = stSource.nextToken();
            if (!meaninglessWords.contains(lemmaS))
                while (stTarget.hasMoreTokens()) {
                    lemmaT = stTarget.nextToken();
                    if (!meaninglessWords.contains(lemmaT)) {
                        if (isWordLessGeneral(lemmaS, lemmaT))
                            lessGeneral++;
                        else if (isWordMoreGeneral(lemmaS, lemmaT))
                            moreGeneral++;
                        else if (isWordSynonym(lemmaS, lemmaT))
                            Equals++;
                        else if (isWordOpposite(lemmaS, lemmaT))
                            Opposite++;
                    }
                }
        }
        return getRelationFromInts(lessGeneral, moreGeneral, Equals, Opposite);
    }
216402
public static boolean matches(final String text1, final String text2, final Configuration config){
        if(config.isRegexLabelText() && text2.startsWith("/") && text2.endsWith("/")){
            return normalize(text1, config).matches(text2.substring(1, text2.length() - 1));
        } else {
            return normalize(text1, config).equals(normalize(text2, config));
//            return normalize(text1, config).equals(text2);
        }
    }
222016
public T find(String text)
    {
        T match = matcher.match(text, true);
        if (match != null)
        {
            String name = match.name();
            if (name.substring(0, Math.min(name.length(), text.length())).equalsIgnoreCase(text))
            {
                return match;
            }
        }
        return null;
    }