private String formatString(String string) {
        char[] characterArray = string.toLowerCase().toCharArray();
        String formatted = "";
        for (char c : characterArray) {
            // Tests numbers 0-9
            if (c >= 48 && c <= 57)
                formatted += c;
            // Tests letters a-z
            if (c >= 97 && c <= 122)
                formatted += c;
            // Tests apostrophe
            if (c == 39)
                formatted += c;
        }
        return formatted.trim();
    }