if ($Hap =~ m/SomeText\n(.*?INT8U.*?)\nSomeText/s) { print "$1"; }