private static String prepareForExport(final String input) {
        String tmp = input.trim().replaceAll(" +", " "); // Multiple whitespace
        if (input.contains("alignat"))
            tmp = tmp.replaceAll("alignat", "alignat*");
        else
            tmp = tmp.replaceAll("align", "align*");
        
        if (tmp.contains(" prvku")) {           // UNIT_GROUP_ELEMENT_ORDER
            tmp = tmp.replace("]\\\\ ", "]");   // Problem setting
            tmp = tmp.replaceAll("\\\\\\\\&", " "); // Fitting set elements to line
        }
        if (tmp.contains("Určete řád permutace ")) {  // PERM_ORDER
            tmp = tmp.replaceAll("\\$\\\\sigma =\\$ \\\\\\\\", "");
            tmp = tmp.replaceAll("\\\\\\[", "\\\\\\[\\\\sigma =");
        }
        return tmp;
    }