Programmatically get own phone number in iOS

At the risk of getting negative marks, I want to suggest that the highest ranking solution (currently the first response) violates the latest SDK Agreement as of Nov 5, 2009. Our application was just rejected for using it. Here’s the response from Apple: “For security reasons, iPhone OS restricts an application (including its preferences and … Read more

Phone number regular expressions exact format

I suggest to buy yourself this book: http://www.amazon.ca/Regular-Expressions-Cookbook-Jan-Goyvaerts/dp/1449319432/ref=sr_1_1?ie=UTF8&qid=1444846344&sr=8-1&keywords=regular+expression+cookbook if you are struggling for such a basic regex (which can be found pretty much everywhere on the net). It’s a cookbook, meaning that the solutions can be use directly as they are in the book. From page 249: ^\(?([0-9]{3})\)?[- ]?([0-9]{3})[- ]?([0-9]{4}) You have three capture groups: … Read more