http://qs1969.pair.com?node_id=578421


in reply to Re^2: Extracting a domain name from a url
in thread Extracting a domain name from a url

This one is one I've been using in production for a while, and seems to hold up well:

my $url="http://proxy.aol.com:8080/login"; my($host)=$url=~/http:\/\/([^\/]+)/;

word!
-Ev

Update: Sorry, I'm a moe - I forgot to add the point of this post in my example!

Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.