procmail
[Top] [All Lists]

Re: matching empty text/plain

2003-06-17 13:39:22
Bart Schaefer skribis:
 
   * $ B ?? ^--$\MATCH$NL(\
              (.+$NL)*\
              Content-Type:[$WSPC]+text/plain.*$NL\
              (.+$NL)*\
             )?\
             ([$WSPC]*$NL)*\
             --$\MATCH(--)?$NL

Let me try to 'clean that up':

    * $ B ?? ^--$\MATCH\
             ^((.+$)*\
               Content-Type:[$WSPC]+text/plain.*$\
               (.+$)*\
              )?\
              ([$WSPC]*$)*\
              --$\MATCH(--)?$

which can be rewritten to this:

CL = "(^.+)*"           # Lines with at least 1 Character
WL = "(^[$WSPC]*)*"     # White Lines

    * $ B ?? ^--$\MATCH\
             ($CL^Content-Type:[$WSPC]+text/plain.*$CL)?\
             $WL\
             ^--$\MATCH(--)?$


Is there a real significance for anything after that last '$\MATCH'?
Is there always white space between 'Content-Type:' and 'text/plain'?
As you will have guessed, I don't think so.

MB   = "^--$\MATCH"     # MIME Border
CL   = "(^.+)*"         # Lines with at least 1 Character
WL   = "(^[$WSPC]*)*"   # White Lines
CTtp = "^Content-Type:[$WSPC]*text/plain.*"

    * $ B ?? $MB\
             ($CL$CTtp$CL)?\
             $WL\
             $MB

-- 
Affijn, Ruud


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>