http://qs321.pair.com?node_id=796408


in reply to perl module to determine if a URL is valid?

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{HTTP}/ and print "Contains an HTTP URI.\n"; }

Replies are listed 'Best First'.
Re^2: perl module to determine if a URL is valid?
by Anonymous Monk on Sep 22, 2009 at 15:45 UTC
    You can also use
    $regexp = qr($RE{URI}{HTTP}{-scheme=>qr/https?/}{-keep});