in reply to Parse hostname from HTML header string

my ( $host, $port ) = $header =~ m/^Host:\s*([A-Za-z0-9\.\-]+):?(\d*)/ +mi;

cheers

tachyon

Replies are listed 'Best First'.
Re^2: Reg eX
by JoeJaz (Monk) on Oct 03, 2004 at 18:16 UTC
    Hi, Thank you for providing this awsome regular expression. Looks like just what I need to do. Joe