On May 25, 2014, at 8:05 AM, Koen van der Drift <koenvanderdr...@gmail.com> wrote:
> However, I noticed that strings that have the form P12345 also turn blue. > Any idea why that string would turn into an NSURL? The url scheme is nil, > and the path components just show P12345. It’s a relative URL — just a single path component, that could be appended to an absolute URL. Trying to recognize plausible URLs is harder than it seems at first glance. I have some boilerplate code that checks whether the scheme is non-nil and longer than one character. If you really want to do it correctly, I think Data Detectors has API for it. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com