I may be mistaken, but that would be any WORD that had: Any number of letters followed by punctuation followed by any number of more letters. Not very familiar with eval or it's return, but the regex looks right.
I.E. counting number of occurrances of things like this... This,that th*at th&at an%d so*on But the period, comma or semicolon at the end of the word shouldn't trigger it. At least I don't think so. :) Steven -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Kuentz (2) Sent: Monday, December 08, 2003 9:22 AM To: Brendan Burns; [EMAIL PROTECTED] Subject: RE: [SAtalk] Weird Word patch how would you use this? Eval's return true/false if I'm not mistaken. So any line with a comma or period would hit. Mike > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Brendan Burns > Sent: Wednesday, December 03, 2003 1:09 PM > To: [EMAIL PROTECTED] > Subject: [SAtalk] Weird Word patch > > > Hey folks, > I hacked together a quick test for words with weird > characters in them, > e.g. > > b;uy m`ore ... > > Add to EvalTests.pm > > sub weird_words { > my ($self, $fulltext) = @_; > my $count = 0; > # Get the text > $fulltext = $self->get_decoded_body_text_array(); > foreach my $line ( @{$fulltext} ) { > my @words = split(' ',$line); > foreach my $word ( @words ) { > if ( $word =~ > /([a-z,A-Z]+)[EMAIL PROTECTED]:;|\\,.]([a-z,A-Z]+)/ ) { > $count++; > } > } > } > return $count; > } > > and > > body WEIRD_WORDS eval:weird_words() > describe WEIRD_WORDS Count words with weird characters in them > > the appropriate .cf file. > > I appologize if this duplicates effort that others have done, > I didn't > see it anywhere. Also this is obviously a rough cut, a > better version > would look up the word (minus characters) in a bad-word dictionary... > > --brendan > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. Become an > expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell > to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Spamassassin-talk mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/spamassassin-talk > ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=ick _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk