use strict;
my $str = '4 BLABLA\\r\\n Table 1. Real GDP\\r\\n Percentage changes\\r\\n 2016 2017 \\r\\nArgentina -2.5 2.7\\r\\nAustralia 2.6 2.5\\r\\n BLABLA \\r\\n Table 2. Nominal GDP\\r\\n Percentage changes\\r\\n 2011 2012\\r\\nArgentina 31.1 21.1\\r\\nAustralia 7.7 3.3\\r\\n';
my $regex = qr/(?=Table \d+\.)/mp;
my $subst = '\\n\\n\\n';
my $result = $str =~ s/$regex/$subst/rg;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html