Check if a string is palindromic skipping nonalphanumeric characters