0

Want to check like Valid URL's are:

www.mywebsite.com
http://www.mywebsite.com
https://www.mywebsite.co.in

Invalid URL's are

wwww.mywebsite.com
htt://www.mywebsite.com
htto://www.mywebsite.com

I try

 NSString *urlRegEx =
     @"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";

This and another regex which must have to http or https, and also it is taking many "w". And only www.mywebsite.com is invalidate by this regex.

Search all the web but stuck here.

nhahtdh
  • 55,989
  • 15
  • 126
  • 162
BHASKAR
  • 1,201
  • 1
  • 9
  • 20

0 Answers0