undef $/; my ($count) = $data =~ s/((a\s*bcd\s*e)(f\s*ghi)(jkl\s*tr))/$&/gsi;