Earl Hood wrote about Use of EXCS (was private: MHonArc patch (addition)):
:On June 19, 1998 at 03:34, Geoff Wing wrote:
:> :And how does this differ from the EXCS resource?
:> Can you specify desired headers with excs? How complicated do you have to
:> make your regex's to allow
:> ^x-this-header.*
:> ^x-another-header.*
:> and otherwise exclude
:> ^x-.*
:From the EXCS resource page:
: The EXCS resource allows you to specify what fields should be
: excluded in the HTML output.
:
: Each line of the <EXCS> element specifies a mail header field to
: exclude in the converted HTML output. Each line is treated as a
: Perl regular expression (NOTE: the regular expression is already
: anchored to the begining of the line).
:You may also want to look at FIELDORDER. FIELDORDER is good if
:you have a specific set of headers you want displayed (regexes not
:supported).
:Now, for the example you gave, it is a little complicated and the
:resources are not designed well for such cases unless you know your
:Perl regular expresions:
:
:<EXCS>
:x-(?!this-header|another-header)
:</EXCS>
:
:I have not tested it, but it utilizes Perl's negative look-ahead
:assertion. Hence, the regex should match any header starting with
:"x-" but not followed by "this-header" or "another-header".
That requires that anyone doing anything out of the ordinary in this area
brush up on perl's extensions to regexp's. I would suggest having a symmetry
of <EXCS> ... </EXCS> and <EXCS KEEP> ... </EXCS> (or some such) where
those defined in keep are matched earlier (as in the patch I sent Earl but
probably noone else has seen). It adds very little overhead since the
exclusion sub is just made once in mhdysub.pl and simplifies things at the
user end.
--
Geoff Wing <gcw(_at_)pobox(_dot_)com> Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/