title: URL Validation (Objective-C)
body: <p>I am trying to validate a URL with this method:</p>
  
  <p>Code:</p>
  
  <pre><code>- (BOOL) validateUrl: (NSString *) candidate {
  
      NSString *urlRegEx=
      @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&amp;]*)";
  
      NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx]; 
      return [urlTest evaluateWithObject:candidate];
  
  }
  </code></pre>
  
  <p>It does not function. I think the problem is with the regular expression.</p>