$ 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
In reply to Re: regular expression - grabbing everything problem
by jwkrahn
in thread regular expression - grabbing everything problem
by notorious
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |