I am trying to validate a form.
When validating a url field, I need to make sure, that the
user provides a string without http(s)://
but may use www.
as well as strings such as xyz.abc.com
- note the two dots.
I tried using
UIApplication.sharedApplication().canOpenURL(url)
but this applies to me having https://
written.
Also I tried this regex from here
let regEx = "((https|http)://)((\\w|-)+)(([.]|[/])((\\w|-)+))+"
after deleting the first part, I don't seem to get the multiple dots working.