Possible Duplicate:
How to validate an url on the iPhone
In Objective-C, does anyone have a good method to test if a given string appears to be a URL?
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.
You can use a regular expression. For iPhone 3 and up, you can do it without a framework. Otherwise use RegexKitLite or something.
Here is a regex pattern for checking URLs:
Doing it without a framework: