I do not use regular expressions. I am trying to create a URI object and see what happens. If this works, I have a URI that I can query to get the schema (other things turn into "inconclusive" URIs).
use URI;
while( <DATA> )
{
chomp;
my $uri = URI->new( $_, 'http' );
if( $uri->scheme ) { print "$uri is a URL\n"; }
else { print "$uri is not a URL\n"; }
}
__END__
foo.html
http://www.example.com/index.html
abc
www.example.com
URI, , , , , , . - URL-, , , , .