if(expr != null) { expr.append(")\\b/||$1||/gi"); return reutil.substitute(expr.toString(), text.getData()); } else return null; }
if (expr.length() > 5) expr.append('|'); expr.append(matches[i].getMatchingTerm()); } if (expr != null) { expr.append(")\\b/||$1||/gi"); return reutil.substitute(expr.toString(), text.getData()); } else return null; }
	private final String processText(TextImpl text, long gid, Match matches[]) {			if(matches == null)				return null;			// sort to get longest string first			Arrays.sort(matches);			// prepare a regular expression to mark match-terms			StringBuffer expr = null;			for (int i = 0; i < matches.length; i++)				if (matches[i].getNodeId() == gid) {					if(expr == null) {						expr = new StringBuffer();						expr.append("s/\\b(");					}					if(expr.length() > 5)						expr.append('|');					expr.append(matches[i].getMatchingTerm());				}			if(expr != null) {				expr.append(")\\b/||$1||/gi");				return reutil.substitute(expr.toString(), text.getData());			} else				return null;		}