Hi Matt, Thanks for the reply. I need the storage because of the logistics involved in the actual problem. Your approach would require hundreds, perhaps thousands, of rules in the real problem I am trying to solve. I used a really simple rule just to illustrate what I want to do.
So the question is, *can* I use storage here? How is it done? As to the eval rules, I've seen some mention of them elsewhere, and will give it a try. Thanks again, Eric > At 01:48 AM 8/18/03 -0400, Eric Hart wrote: >1. I want to find a string that matches on the regular >expression /peni(s|$)/. I want to temporarily store the string that >matched, and then test whether it includes the character "$". The idea >being that a hit on "peni$" will score higher than a hit on "penis". What >is the best way to store a matched string and perform further tests just >on that string? Why do you want storage here? If you want to make two scores, you _HAVE_ to make two rules... If you have to make two rules, write one that matches penis, and one that matches peni$ and give them separate scores.. anything else is just wasting cpu time by over-complicating the problem. If however you do want to do combination matches (this is NOT a good use for one) check into meta rules.. the rule guide has examples. http://mywebpages.comcast.net/mkettler/sa/SA-rules-howto.txt >2. Similarly, I would like to create a rule that penalizes the appearance >of the recipient name in the subject of an email. This rule would first >parse the "to" field and extract and store the recipient's mail name >("ehart" for example). It would then test the subject field to see if >this stored mail name is contained in the subject. This one would need to be an eval test. There's currently no way in a normal rule to look to see if a variable substring in one header matches is also in another header. You can look for "ehart" in both, by using a meta rule, but it won't be able to dynamically see if any other usernames do the same thing. < ---------------------------------------------------------- Eric Hart Network Performance, Inc. (NPI) [EMAIL PROTECTED] 802-859-0808 x213 802-859-0807 (fax) www.npi.net 85 Green Mountain Drive South Burlington, VT 05403 ---------------------------------------------------------- === All NPI email scanned for spam and viruses by SpamRejector(tm). SpamRejector.net ===