On Sep 2, 2010, at 11:54 AM, John Musbach wrote:
> Very neat trick, looking at your fortune file, what does the following
> line do? Grab text from a web resource?
>
> (?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
It looks like a regex to parse urls into components. Similar to the one that
the DaringFireball page has been hosting:
http://daringfireball.net/2010/07/improved_regex_for_matching_urls
--
Karl Kuehn
[email protected]_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk