private void doSearch() {

		searchText = null;
		clearStatusText();
		if (!searchButton.isEnabled()) {
			return;  // don't search while disabled
		}

		String text = textCombo.getText();
		if (!validateRegex(text)) {
			return; // leave the dialog open so the user can see the error text
		}

		isCancelled = false;
		searchText = text;
		updateSearchHistory(searchText);
		close();
	}
A dialog to gather input for performing a search over decompiled text.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/search/DecompilerTextFinderDialog.java