Subject:
|
Re: spamcake collection
|
Newsgroups:
|
lugnet.off-topic.geek
|
Date:
|
Fri, 16 Jul 1999 23:37:23 GMT
|
Reply-To:
|
JSPROAT@ihatespamIO.COM
|
Viewed:
|
1551 times
|
| |
| |
<378FBB46.D26CC30B@io.com> <378FBCE8.8372AB28@io.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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:
BREAKAGE: while( $lineIn = <STDIN> ) {
if( $lineIn =~ m/\bTom McD\b/ ) {
while( $msgIn = <STDIN> ) {
if( $msgIn !~ m/^>/ && $msgIn =~ m/spam/i ) {
chomp $msgIn;
if( $msgIn =~ m/spamcake/i ) {
$spamcake = $msgIn;
} else {
$spamcake = "NOT-SPAMCAKE: $msgIn";
}
while( $sigIn = <STDIN> ) {
if (
$sigIn =~ m/^\s*$/ ||
$sigIn =~ m/^[^:]+:/ ||
$sigIn =~ m/^>+\s*$/
) {
$spamcake .= "\n";
$sigs{$spamcake} = 1;
next BREAKAGE;
}
chomp $sigIn;
$spamcake .= " $sigIn";
}
} else {
last;
}
}
}
}
foreach ( keys %sigs ) { print; }
Cheers,
- jsproat
p.s. I know, this Friday's a bust for workplace productivity... :-P
--
Jeremy H. Sproat <jsproat@io.com>
http://www.io.com/~jsproat
When replying, please release the spleencake
|
|
Message has 2 Replies: | | 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)
|
Message is in Reply To:
71 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|