String parseResponse(String response) {
        StringBuffer output = new StringBuffer();

        output.append(response.split("\\s+", 3)[1] + "\t");
        output.append(Integer.toString(response.length()) + "\t");

        for (String grep : grepStrings) {
            if (response.indexOf(grep) != -1) {
                output.append(grep + "\t");
            }
        }
        for (String extract : extractStrings) {
            int from = response.indexOf(extract);
            if (from == -1) {
                continue;
            }
            from += extract.length();
            int to = response.indexOf("<", from);
            if (to == -1) {
                to = response.length();
            }
            output.append(response.subSequence(from, to) + "\t");
        }

        return output.toString();
    }