I'm coming in to this late in the game, but I would seriously considerswitching the string to upper case BEFORE processing.