use Regexp::Common qw /URI/; if ($string =~/$RE{URI}{HTTP}/) { ... }