use Regexp::Common; $text =~ s[($RE{URI}{HTTP})] [$1]g;