Compare Revisions
Last modification
- Rev 33 2012-12-06 00:07:25
- Author: PointedEars
- Log message:
* tools/network/news/newsstat/newsstat.pl
- Thread subject processing:
+ Remove "Re:" at the start even if preceded by
or not followed by whitespace
+ Remove "(was: ...)" at the end including surrounding whitespace
/trunk/tools/network/news/newsstat/newsstat.pl |
326,7 → 326,8 |
|
## Get threads |
my $thread = $msg->study('Subject'); |
$thread =~ s/^re:\s+//i; # Remove Re: or re: at start |
$thread =~ s/^\s*re:\s*//i; # Remove Re: or re: at the start |
$thread =~ s/\s*\(was:\s*.*\)\s*$//i; # Remove (was: ...) at the end |
$thread =~ s/\s+/ /g; # collapse whitespace |
$threads{$thread}{'count'}++; # bump count of this subject |
$threads{$thread}{'size'} += $filesize; # bump bytes for this thread |