From: Thomas Hochstein Date: Sun, 27 May 2012 11:58:32 +0000 (+0200) Subject: Match TLHs correctly, not only partially. X-Git-Tag: 0.01~1^2~7^2~6 X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=commitdiff_plain;h=7773fb6d8f26f2d2331a4bb394ed164160a9a210;ds=sidebyside Match TLHs correctly, not only partially. The TLH was checked to match the beginning of the newsgroup name, not the whole TLH part. So the TLH "de" would match not only "de.test", but also "denver.test", which was not the desired outcome. Signed-off-by: Thomas Hochstein --- diff --git a/gatherstats.pl b/gatherstats.pl index d2d4faa..6e41485 100755 --- a/gatherstats.pl +++ b/gatherstats.pl @@ -85,9 +85,15 @@ if ($Conf{'TLH'}) { } # strip whitespace $TLH =~ s/\s//g; + # add trailing dots if none are present yet + # (using negative look-behind assertions) + $TLH =~ s/(?