in reply to regex a url

Shamelessly stolen from perldoc URI:

PARSING URIs WITH REGEXP

As an alternative to this module, the following (official) regular expression can be used to decode a URI:

my($scheme, $authority, $path, $query, $fragment) = $uri =~ m|^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?: +#(.*))?|;

--
Cheers, Joe