[Doc-SIG] What counts as a url?

Tony J Ibbs (Tibs) tony@lsl.co.uk
Mon, 19 Mar 2001 09:51:25 -0000

M.-A. Lemburg wrote:
> FYI, I use this RE in my apps:
> 	r'\b((?:http|ftp|https|mailto)://[\w@&#-_.!~*();]+\b/?)'
> I don't think it makes sense to include schemes which are not
> supported by your everyday browser, so only the most common ones
> are included.

Except that I'm paranoid (well, no, really just a worried pedant) and
don't like trying to embed a complete list of resource/schemes in the
RE - for instance, I've known people who would get upset by the absence
of both "news" and "gopher" in the above.

And if I were writing a Python library to *handle* a new scheme (for
instance, perhaps, for Mozilla?) then I might be upset if I couldn't see
it in my docstrings.


(on the other hand, this *is* worth refining over time, and we need not
get it *perfect* at the start).

Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
"How fleeting are all human passions compared with the massive
continuity of ducks." - Dorothy L. Sayers, "Gaudy Night"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)