Article View: news.software.readers
Article #230621Dialog: Can't get regex to work on From header for oddball case
From: VanguardLH
Date: Tue, 24 Feb 2009 16:40
Date: Tue, 24 Feb 2009 16:40
82 lines
5089 bytes
5089 bytes
There has been a troll wandering around that I typically call "Terry's
Web Server" because that's what he started with (although I think he
started with just "t"). A Google Groups copy of his post today is at:
http://groups.google.com/group/24hoursupport.helpdesk/msg/5c592a116f78bd02
I have a scoring filter that has been working in the past but failed on
this post. He always posts using a moniker of:
[something] Web Server <[variable]server[variable]>
Today he was (all on one line):
Investigative Reporter Web server <"Investigative
Reporter1123.Web.server">
Notice the double-quotes inside the address field (which, I believe, is
not valid but obviously he doesn't care). He also always posts through
Earthlink's NNTP server. So my scoring rule was (also all on one line):
!ignore From {\bWeb Server.*<.+server.*>}
+@Header:{^Path:.*!news\.earthlink\.com\.POSTED!not-for-mail$}
I use a view that hides ignored threads hence the ignore directive.
Actually I also use the setcolor and markread directives along with
ignore but am simplifying the filter as presented here.
The +@Header filter checks if the post came through Earthlink's NNTP
server. Since I download the bodies of new posts in each group to which
I subscribe (because they're all text groups), I can test on the non-
overview headers. This filter has been working quite well for awhile.
Then today it failed. The difference that I see today is this troll's
use of double-quotes within the address string (i.e., between the angled
brackets).
I found out through successive reductions in the filter that the Header
portion was working okay but not the From portion. So I reduced the
filter to just test on the From header and just on the name field:
!ignore From {\bWeb Server.*<.*>}
That works but it is a bit too vague to just identify this troll's posts
(although I will later add back the Header portion of the filter).
However, as soon as I attempt to enter any substring from the address
field (between the angle brackets), the filter will fail - but only when
the scoring filters are applied against posts (it works when checked
using Dialog's regex tester). Maybe this is because of the double
quotes.
Besides always having "Web Server" in his name, he always has "server"
near or at the end of his address. Usually it's <something.server> but
sometimes "server" isn't right up against the closing angle bracket.
There's always some characters after the opening angle bracket before
the "server" substring and there can be zero, one, or a couple
characters after the "server" substring before the closing angle
bracket. For his moniker today:
Investigative Reporter Web server <"Investigative
Reporter1123.Web.server">
I've tried both:
!ignore From {\bWeb Server.*<.+server.*>}
and
!ignore From {\bWeb Server.*<.*server.*>}
Nope. Dialog fails as soon as any substring is added to the filter
(which happens to be double-quoted inside the angle brackets). However,
it does NOT fail when I use Dialog's regex tester. When I use its regex
tester and enter:
Regex: \bWeb Server.*<.+server.*>
String: Investigative Reporter Web server <"Investigative
Reporter1123.Web.server">
I get a match. Its regex tester says that my regex filter will work but
when I run the scoring filters against the posts then it fails (so the
troll's post doesn't get flagged as ignored). The regex works against
the value of the From header when checked using their tester. It
doesn't work when it actually gets used for scoring posts.
Technical Details
Message-ID:
<go17uo$1j9$1@news.motzarella.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <go17uo$1j9$1@news.motzarella.org> Subject: Dialog: Can't get regex to work on From header for oddball case Date: Tue, 24 Feb 2009 10:40:57 -0600 From: VanguardLH <V@nguard.LH> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Newsgroups: news.software.readers Organization: 0.35MOA sniper at loose in Usenet Lines: 82 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.eternal-september.org U2FsdGVkX1/xdMVjSSKzVKvmBnHdD8mM22vzYI98gGdDYkQAQp5bdlx9cTNKl7VaOHHoefaL6Q71pFb89sVLTsbDKBNMd23OYla/OkBJ9Tsu3pAyHdNOk25cdJvb/UvD1mH/2Z6THqYg/xd4dgWhqw== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 24 Feb 2009 16:40:56 +0000 (UTC) Keywords: VanguardLH VLH811 X-Antivirus-Status: Not-Tested X-Auth-Sender: U2FsdGVkX1/K4+Bcb721MgVWvAoPJxsIZs+4ZJrDPKWGpQp/MW0w7w== X-Antivirus: avast! (VPS 090223-0, 02/23/2009), Outbound message Cancel-Lock: sha1:yrsV8hHIBwUrf2LX6uM7QW9zykI= User-Agent: 40tude_Dialog/2.0.15.1 X-MOTD: It is wiser to remain silent and let others ponder your ignorance than to speak and remove all doubt