Convert the result string to all caps or all lower case before comparison and it will deal with any odd case combination.