• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Create a NSURL as a way to validate urls - not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create a NSURL as a way to validate urls - not working


  • Subject: Re: Create a NSURL as a way to validate urls - not working
  • From: Keary Suska <email@hidden>
  • Date: Mon, 02 Mar 2015 17:52:54 -0700

On Mar 2, 2015, at 4:55 PM, Juanjo Conti <email@hidden> wrote:

> Ok, I wanted to validate that the url is an absolute one. Is there
> something in Swift standard lib to do this?

That depends on what you mean by "validate." If you simply mean checking whether it well-formed, you can do that easily with a regular expression match, such as (written in email):
	^http://(?:[a-z0-9-]+\.){1,}[a-z]{2,4}

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Create a NSURL as a way to validate urls - not working
      • From: Jens Alfke <email@hidden>
References: 
 >Create a NSURL as a way to validate urls - not working (From: Juanjo Conti <email@hidden>)
 >Re: Create a NSURL as a way to validate urls - not working (From: Mike Abdullah <email@hidden>)
 >Re: Create a NSURL as a way to validate urls - not working (From: Juanjo Conti <email@hidden>)

  • Prev by Date: Re: Inconvenient exception impossible to get rid of?
  • Next by Date: Re: Create a NSURL as a way to validate urls - not working
  • Previous by thread: Re: Create a NSURL as a way to validate urls - not working
  • Next by thread: Re: Create a NSURL as a way to validate urls - not working
  • Index(es):
    • Date
    • Thread