my $text = <<""; adfRadfaUYBGsQWERaeYETEWoyMSn nbPOIVcRCVVfOOPQbHbnRIIqWweRT for my $match ( $text =~ /(?<=[A-Z]{4})([a-z])(?=[A-Z]{4})/g ) { print $match, $/; }