in reply to Identifying a Malformed URI
Then you can examine the contents of it to see if they are OK. Otherwise, you can use the "official" regexp to parse them. This is taken from the URI man page:use URI; my $uri = new URI ($some_uri);
my($scheme, $authority, $path, $query, $fragment) = $uri =~ m|^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#( +.*))?|;
|
|---|