in reply to regular expression - grabbing everything problem
$ cat sample.txt | perl -wnl -e '/\.X\-Intermail\-Unknown\-MIME\-Type\ +=unparsedmessag(e.*)/s and print $1;'
You need to slurp the entire file and you don't need to use cat:
$ perl -0777nle '/\.X-Intermail-Unknown-MIME-Type=unparsedmessage(.*)/ +s and print $1;' sample.txt
|
|---|