To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 266
265  |  267
Subject: 
Re: spamcake collection
Newsgroups: 
lugnet.off-topic.geek
Date: 
Sat, 17 Jul 1999 03:10:03 GMT
Viewed: 
1310 times
  
In lugnet.off-topic.geek, Jeremy H. Sproat writes:
In lugnet.off-topic.geek, Jeremy H. Sproat writes:
Sproaticus wrote:
Sproaticus wrote:
Sproaticus wrote:
I'm not sure this will get all of them.  It does introduce some
non-sig text.
Here's a better version, which...
...handles naked, quoted lines;
...outputs one spamcake per line;
...but doesn't take into account spamcake sigs which don't say
"spamcake"on the first line;
...but does remove duplicates;
...and handles non-spamcake spam appearances;
...and finally handles spam on not-the-first-line;
...and starts spamcake sigs immediately after the /\bTom McD\b/ instead on the
next line:

BREAKAGE: while( $lineIn = <STDIN> ) {
  if( $lineIn =~ m/\bTom McD\b\.?\s*/ ) {
    $spamcake = $';
    chomp $spamcake;
    while( $msgIn = <STDIN> ) {
      chomp $msgIn;
      $spamcake .= $msgIn;
      if( $msgIn !~ m/^>/ ) {
        chomp $msgIn;
        while( $sigIn = <STDIN> ) {
          if (
            $sigIn =~ m/^\s*$/ ||
            $sigIn =~ m/^[^:\s]+:/ ||
            $sigIn =~ m/^>+\s*$/
          ) {
            $spamcake .= "\n\n";
            $sigs{$spamcake} = 1;
            next BREAKAGE;
          }
          chomp $sigIn;
          $spamcake .= " $sigIn";
        }
      } else {
        last;
      }
    }
  }
}
foreach ( keys %sigs ) {
  if( m/spam/is ) {
    print "NOT-SPAMCAKE: " unless m/spamcake/is;
    print;
  }
}

Cheers,
- jsproat

--
LUGNET: The most entertaining RCS tool.



Message is in Reply To:
  Re: spamcake collection
 
(...) ...and finally handles spam on not-the-first-line: BREAKAGE: while( $lineIn = <STDIN> ) { if( $lineIn =~ m/\bTom McD\b/ ) { while( $msgIn = <STDIN> ) { chomp $msgIn; $spamcake = $msgIn; if( $msgIn !~ m/^>/ ) { chomp $msgIn; while( $sigIn = (...) (25 years ago, 17-Jul-99, to lugnet.off-topic.geek)

71 Messages in This Thread:






























Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR