protected boolean tryMatch() {
		if (pattern == null) {
			return false;
		}
		logTextArea.setText("");

		setMatches(false);
		setHighlightFromMatcher(null);

		matcher.reset(stringTF.getText());
		if (match.isSelected() && matcher.matches()) {
			setMatches(true);
			setHighlightFromMatcher(matcher);
			logTextArea.setText("");
			for (int i = 0; i <= matcher.groupCount(); i++) {
				logTextArea.append(i + " " + matcher.group(i) + "\n");
			}
		} else if (findButton.isSelected() && matcher.find()) {
			setMatches(true);
			setHighlightFromMatcher(matcher);
			logTextArea.setText(matcher.group());
		} else if (findAll.isSelected()) {
			int i = 0;
			while (matcher.find()) {
				logTextArea.append(i++ + ": " + matcher.group() + "\n");
			}
			if (i > 0) {
				setMatches(true);
				return true;
			}
		}

		return isMatch();
	}