public static String clean(String str)
    {
        char[] alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m',
                            'n','o','p','q','r','s','t','u','v','x','y','z'};
        
        StringBuilder sb = new StringBuilder();
        String temp;
        
        //lowerCase
        temp = str.toLowerCase().replaceAll(" ", "");
         
        //filter against alphabet
        for(int i = 0; i < temp.length(); i++ )
            for(int j = 0; j < alphabet.length; j++ )
                if(temp.charAt(i) == alphabet[j])
                    sb.append(temp.charAt(i));
        
        return sb.toString();
    }