--On Wednesday, October 27, 2004 13:55 -0500 Thomas Juntunen <juntunen at crc-inc.com> wrote: > On 10/27/2004 13:47, "Alexandre Gauthier" <supernaut at underwares.org> > wrote: > >> It just occured to me, why can't you do something such as >> cat file_containing_very_long_text_from_a_email_body | grep --yourstuff >> 'your regex'? > > I'm no expert at grep/egrep, but looking at their man pages, I don't see > a way to cause patterns to apply beyond line endings. Using perl or > python, one can specify a "global" flag that causes the dot > metacharacter to match line-ends which it ordinarily wouldn't do. The > options listed for grep/egrep don't specify a way to do that (that I can > see) and my limited experimenting on my Panther machine didn't work. Try this perl script: mg: multi-line grep <http://www.srekcah.org/~utashiro/perl/scripts/mg/mg-5.0.1.2> -sjk