You will probably have some sort of regular expression or something else. Just because using an except filter is too dangerous (you may skip some illegal characters).
Therefore, I recommend that you use RegexKitLite (http://regexkit.sourceforge.net/RegexKitLite/) in combination with the following line of code:
inputString = [inputString stringByReplacingOccurencesOfRegex:@"([^A-Za-z0-9]*)" withString:@""];
This will replace all characters except AZ, az and 0-9 =)!
source share