-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 23 Sep 2001 23:57:10 +0200, Cyril Malka [CM] wrote these
comments:
...
ACM>> <all in a single line>
ACM>> %subject='[flammer]
ACM>>
Re:%setpattregexp="%subject='Re:%setpattregexp="(?i)\A\:?(\s*\[.*\])?(\s*\(?(re|ha|rcpt|fwd|fw)\)?(\[\d*\])?:?\s+)*(.*)"%RegExpBlindMatch="%OSubj"%SubPatt="5"'"%RegExpBlindMatch="%OSubj"%SubPatt="5"'
ACM>> <all in a single line>
CM> It does work actually!
Great!! :-)
CM> Now... if you had a bit of time... Could you explain to me exactly
CM> what every action is doing? I'd like to learn... Only if it's not
CM> too much trouble...
This is a toughy. :-)
Ok:
I wish to make the subject:
[flammer] Re: <the real message subject>
Now, the incoming message will have a string preceeding the real part
you wish to retain, such as:
[flanner] Re: <the real message subject>
or
Re: Fwd: <the real message subject>
or
Re: [flanner] Re: <the real message subject>
How do we get just <the real message subject> and leave everything
else behind. This is where:
%setpattregexp=<regex> %regexpblindmatch="osubj" %Subpatt="5"
comes in.
What this is doing is using the regex defined to see if a match occurs
using the original message subject (osubj). If the match occurs then
from it take only the part that matches subpattern 5 of the regex.
Let's look at the regex (regular expression):
(?i)\A\:?(\s*\[.*\])?(\s*\(?(re|ha|rcpt|fwd|fw)\)?(\[\d*\])?:?\s+)*(.*)
|----1----| |==2=|--------3----------|===|---4---|==2===| |-5-|
The regular expression may be split up into subpatterns as shown. The
brackets denote the start and finish of a subpattern (note that
subpatterns may be within another subpattern). Subpattern 5 is the
part that will match the real subject. It simply matches one or more
characters of any type. The part that precedes subpattern 5 matches
the various possibilities that may occur before the real subject.
I won't go into what how each subpattern matches and the regex syntax
since it's out of the scope of this list. However, if you wish to go
any further into this, you could subscribe to TBTECH and we can go
through it there with the input of others.
- --
�Allie C Martin �� List Moderator (and fellow end-user)
PGP public key: http://pgpkey.ac-martin.com
__________________________________________________________
MUA: The Bat! 1.54 Beta/9 [OS: Windows 2000 Service Pack 2]
_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6a (Win32)
Comment: Sealed for security.
iEYEARECAAYFAjuuY48ACgkQV8nrYCsHF+KqggCgxmAbF4WPzm8v+Yep9zxOIa1P
6GcAoIf3Y3FSm0kqDhkxYPrsHlJqyX3p
=iXC+
-----END PGP SIGNATURE-----
--
________________________________________________________
Archives : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d