Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / doc / MHonArc / resources / msgexcfilter.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
<html>
<head>
<title>MHonArc Resources: MSGEXCFILTER</title>
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="msgbodyend.html">MSGBODYEND</a>]</td><td><nobr>[<a href="../resources.html#msgexcfilter">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="msgfoot.html">MSGFOOT</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<h1>MSGEXCFILTER</h1>
<!-- *************************************************************** -->
<hr>
<h2>Syntax</h2>
<dl>
<dt><strong>Envariable</strong></dt>
<dd><p>
<code>M2H_MSGEXCFILTER=</code><var>Perl_expressions</var>
</p>
</dd>
<dt><strong>Element</strong></dt>
<dd><p>
<code>&lt;MSGEXCFILTER&gt;</code><br>
<var>Perl_expressions</var><br>
<code>&lt;/MSGEXCFILTER&gt;</code><br>
</p>
</dd>
<dt><strong>Command-line Option</strong></dt>
<dd><p>
<code>-msgexcfilter </code><var>Perl_expressions</var>
</p>
</dd>
</dl>
<!-- *************************************************************** -->
<hr>
<h2>Description</h2>
<p>MSGEXCFILTER may be used to define Perl expressions to
selectively exclude messages during an
<a href="add.html">ADD</a> operation. Unlike the
<a href="checknoarchive.html">CHECKNOARCHIVE</a> resource,
MSGEXCFILTER allows you to explicitly examine entire message headers
to determine which messages should be added.
</p>
<p>When defining the expressions, the raw message header will be in
the <b><tt>$_</tt></b> variable. If the last evaluated expression
of MSGEXCFILTER returns a true value, or there is an explicit
<tt>return</tt> statement that returns a true value, MHonArc will
exclude the message.
</p>
<!-- *************************************************************** -->
<hr>
<h2>Default Setting</h2>
<p>Nil.
</p>
<!-- *************************************************************** -->
<hr>
<h2>Resource Variables</h2>
<p>N/A
</p>
<!-- *************************************************************** -->
<hr>
<h2>Examples</h2>
<p>A typical usage of MSGEXCFILTER is to define a pattern match
operation:
</p>
<pre>
<b>&lt;MsgExcFilter&gt;</b>
/^From: .*\behood@/im;
<b>&lt;/MsgExcFilter&gt;</b>
</pre>
<p>Here, we are excluding any messages that are from "ehood". The
"<tt>m</tt>" modifier to the pattern match exists because the
header will contain newlines.
</p>
<p>The following example attempts to exclude all messages not addressed
to <tt>mhonarc-users@mhonarc.org</tt>:
</p>
<pre>
<b>&lt;MsgExcFilter&gt;</b>
!/\bmhonarc-users@mhonarc.org\b/i;
<b>&lt;/MsgExcFilter&gt;</b>
</pre>
<p>Here, we do what the <a href="checknoarchive.html">CHECKNOARCHIVE</a>
resource basically does:
</p>
<pre>
<b>&lt;MsgExcFilter&gt;</b>
/^restrict:\s+no-external-archive/im ||
/^x-no-archive:\s+yes/im;
<b>&lt;/MsgExcFilter&gt;</b>
</pre>
<!-- *************************************************************** -->
<hr>
<h2>Version</h2>
<p>2.4.1
</p>
<!-- *************************************************************** -->
<hr>
<h2>See Also</h2>
<p>
<a href="add.html">ADD</a>,
<a href="checknoarchive.html">CHECKNOARCHIVE</a>
</p>
<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="msgbodyend.html">MSGBODYEND</a>]</td><td><nobr>[<a href="../resources.html#msgexcfilter">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="msgfoot.html">MSGFOOT</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2002/07/27 05:13:10 $ <br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"
><strong>MHonArc</strong></a><br>
Copyright &#169; 1999, <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc@mhonarc.org"
>mhonarc@mhonarc.org</a><br>
</address>
</body>
</html>