use Regexp::Common qw(URI); my $re = qr/$RE{URI}{HTTP}(?:#[\w_%:-]+)?(?