[mew-int 01955] Re: bug in incm

Werner LEMBERG wl at example.com
Wed Jan 26 15:32:28 JST 2005


> Please add some more heuristic tests to avoid this case [...]

I took a look into the Mail::Mbox::MessageParser::Grep module (from
cpan.org), and I found this regexp which works for me.  For better
readability I've split the long regexp into smaller strings.

  grep --extended-regexp                  \
       --line-number                      \
       --byte-offset                      \
       --binary-files=text                \
       "^(X-Draft-From: .*"               \
         "|X-From-Line: .*"               \
         "|From [^:]+(:[0-9][0-9]){1,2} " \
           "([A-Z]{2,3} [0-9]{4}"         \
            "|[0-9]{4} [+-][0-9]{4}"      \
            "|[0-9]{4})"                  \
           "( remote from .*)?)"          \
       "\r?\$"


     Werner



More information about the Mew-int mailing list