[Mimedefang] FOLLOWUP Q - Using a db for subject lines to blo ck

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Thu Jun 23 11:21:14 EDT 2005


Matthew wrote:
> Ken wrote:
>> David F. Skoll wrote:
>> 
>>> You are now converting an O(1) or possibly O(log N) database lookup
>>> into an O(N) or possibly O(N log N) scan through the database (N is
>>> the number of keys in the database table.)
>> 
>> Thinking about this a bit more, my objective was to just try to deal
>> with keywords that were spaced out "l i k e  t h i s".
>> 
>> Here's a new addition to the subject-line block rule that will help
>> some, for those who are interested.
>> 
>>         $lc_subject =~ s!((^|\s)\S\s(\S(\s|$)){2,})!
>>             my $lc_subject_x=$1;$lc_subject_x=~s/\s//g;sprintf "%s","
>> $lc_subject_x ";!ego;
> 
> Here's a reimplementation...
> 1 while $lc_subject =~ s/\b(\S)\s(\S)\b/$1$2/g;

Never mind - my implementation makes F R E E become FR EE... working on it

-- 
Matthew.van.Eerde (at) hbinc.com                 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"




More information about the MIMEDefang mailing list