i am creating a program to see if a word is a palindrome, but i want it, when the word is read, to ignore the spaces and punctuation in the word/sentance. i am using apstring. how would i og about doing this.

for example, if i type "madam i'm adam", the program reads the spaces, and backwards it reads "mada m'i madam" which is wrong, i want it to ocmpletly ignore spaces. puct. thanks

tony