Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patrover

macrumors newbie
Original poster
i have a string: (2434)-45455

and i want to filter out all the non-numeric chars ( i.e "()-" ), what is the best way?


thanks
 
stringByTrimmingCharactersInSet: probably won't be useful for this purpose.

Look at the string programming guide, as suggested. Also look at NSScanner. If you prefer regular expressions you could look into that as well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.