my $HostnameRegex = qr/[-a-z0-9]+(?:\.[-a-z0-9]+)*\.(?:com|edu|info)/i; my $HttpUrl = qr{ http:// $HostnameRegex \b # Hostname (?: / [-a-z0-9_:\@&?=+,.!/~*'%\$]* # Optional path (?