/** * match the given <code>text</code> with the pattern * @return true if matched eitherwise false * @param text a String object */ public boolean match(String text) { return match(text, 0, text.length()); } /**
parseNoWildCards(); } else { parseWildCards();
/** * @param text a simple regular expression that may only contain '?'(s) * @param start the starting index in the text for search, inclusive * @param end the stopping point of search, exclusive * @param p a simple regular expression that may contains '?' * @return the starting index in the text of the pattern , or -1 if not found */ protected int regExpPosIn(String text, int start, int end, String p) { int plen= p.length(); int max= end - plen; for (int i= start; i <= max; ++i) { if (regExpRegionMatches(text, i, p, 0, plen)) { return i; } } return -1; }
if(!regExpRegionMatches(text, start, current, 0, segLength)) { return false; } else { int k= current.indexOf(fSingleWildCard); if (k < 0) { currentMatch= textPosIn(text, tCurPos, end, current); if (currentMatch < 0) { return false; currentMatch= regExpPosIn(text, tCurPos, end, current); if (currentMatch < 0) { return false; return regExpRegionMatches(text, end - clen, current, 0, clen);
pattern.append('*'); StringMatcher matcher= new StringMatcher(pattern.toString(), true, false); if (matcher.match(longer)) { longestCommonSubstring= substring;
int x= posIn(text, start, end); if (x < 0) { return null; for (i= 0; i < segCount && curPos < end; ++i) { String current= fSegments[i]; int nextMatch= regExpPosIn(text, curPos, end, current); if (nextMatch < 0 ) { return null;