I have a NSString that contains fax telephone numbers. Sometimes I get different formats entered for example: (877) xxx-xxxx or 877-xxx-xxxx.
How do I get about cleaning the NSSString so that all I get is XXXxxxxxx.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using
NSCharacterSetandNSMutableCharacterSetyou can solve this problem in two ways.If you already know the characters that you want to remove.
If you don’t know the characters, you can use the different character sets available already