use Regexp::Common qw /URI/; my $re = $RE{URI}{HTTP}; $re =~ s/http/https?/g;