private List<Integer> search(final String searchString) {
    if (!"".equals(searchString)) {
      add(searchString);
    }

    final List<Integer> resultRowIndices = new ArrayList<>();

    if (!temporaryTableUse) {
      reset();
    }

    final int rows = table.getRowCount();

    boolean found;

    boolean primarySearch = primarySideSearch;
    boolean secondarySearch = secondarySideSearch;

    if (!primarySearch && !secondarySearch) {
      primarySearch = true;
      secondarySearch = true;
    }

    for (int row = 0; row < rows; ++row) {
      StringBuilder rowText = new StringBuilder();
      for (final Pair<Integer, ESide> column : affectedColumnIndices) {
        if (column.second() == ESide.PRIMARY && primarySearch) {
          rowText.append(table.getValueAt(row, column.first()));
        } else if (column.second() == ESide.SECONDARY && secondarySearch) {
          rowText.append(table.getValueAt(row, column.first()));
        }
      }

      if (isRegEx) {
        Pattern pattern;

        if (isCaseSensitive) {
          pattern = Pattern.compile(searchString);
        } else {
          pattern = Pattern.compile(searchString, Pattern.CASE_INSENSITIVE);
        }

        final Matcher matcher = pattern.matcher(rowText.toString());

        found = matcher.find(0);
      } else if (isCaseSensitive) {
        found = rowText.toString().contains(searchString);
      } else {
        found = rowText.toString().toLowerCase().contains(searchString.toLowerCase());
      }

      if (found) {
        resultRowIndices.add(row);
      }
    }

    return resultRowIndices;
  }
Editable combo box used for searching in UI tables.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/components/viewsearchfield/TableTextSearchComboBox.java