🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by VanguardLH Tue, 24 Feb 2009 16:40
Dialog: Can't get regex to work on From header for oddball case
#230621
Author: VanguardLH
Date: Tue, 24 Feb 2009 16:40
82 lines
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.
Re: Dialog: Can't get regex to work on From header for oddball case
#230627
Author: Beauregard T. Shagnasty
Date: Tue, 24 Feb 2009 18:54
20 lines
2239 bytes
VanguardLH wrote:

> 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]>

The simple:   
!markread From Web Server   or   !delete From Web Server
seems to work quite well.

-- 
   -bts
   -Friends don't let friends drive Windows
Re: Dialog: Can't get regex to work on From header for oddball case
#230626
Author: VanguardLH
Date: Tue, 24 Feb 2009 21:23
49 lines
3845 bytes
Beauregard T. Shagnasty wrote:

> VanguardLH wrote:
> 
>> 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]>
> 
> The simple:   
> !markread From Web Server   or   !delete From Web Server
> seems to work quite well.

Alas that really isn't unique enough to identify just this troll's
posts.  That would, for example, tag on someone using "Web Server Guide"
which would NOT match on the troll's variation of his monikers.  I could
test that "Web Server" was at the end of the From header (before the
angle bracket delimiting the address field) so I can use:

!ignore From {\bWeb Server <.*>}
+@Header:{^Path:.*!news\.earthlink\.com\.POSTED!not-for-mail$}

This is close to what I had before but doesn't include any substring
that might be always available within the address field (inside the
angled brackets).  This modified filter only tags posts where "Web
Server is at the end of the name field and the poster is using
Earthlink.  I wanted to capture as much of the From header's value as
possible that this troll consistently uses in this header, like the
"server" substring that is always present in the address field at the
end or just 1 or 2 characters away from the closing angle bracket.

That the filter:

!ignore From {\bWeb Server <.+server.*>}
+@Header:{^Path:.*!news\.earthlink\.com\.POSTED!not-for-mail$}

doesn't work when scoring is applied (but DOES work in the program's own
regex tester) seems to indicate that Dialog is screwed up during that
actual *application* of its scoring filters - but this has only appeared
for the mentioned post because the address field's value was double
quoted in that post.  Maybe there is a parsing error when scoring
filters are applied due to the double-quoted address value but not when
using the regex tester.
Re: Dialog: Can't get regex to work on From header for oddball case
#230636
Author: vg4cysss7001
Date: Wed, 25 Feb 2009 11:14
18 lines
2151 bytes
In article <go17uo$1j9$1@news.motzarella.org>, VanguardLH <V@nguard.LH> 
writes
[snip]
>I've tried both:
>
>!ignore From {\bWeb Server.*<.+server.*>}
>
>and
>
>!ignore From {\bWeb Server.*<.*server.*>}

I a not fully compos mentis right now, but should not the "." after 
"Server" be "escaped" with a "\" (backslash)?

-- 
Misha
Free on-line, off-site backups?
<https://mozy.com/?ref=UK45Y5>
Re: Dialog: Can't get regex to work on From header for oddball case
#230639
Author: VanguardLH
Date: Wed, 25 Feb 2009 15:34
33 lines
2833 bytes
vg4cysss7001 wrote:

> In article <go17uo$1j9$1@news.motzarella.org>, VanguardLH <V@nguard.LH> 
> writes
> [snip]
>>I've tried both:
>>
>>!ignore From {\bWeb Server.*<.+server.*>}
>>
>>and
>>
>>!ignore From {\bWeb Server.*<.*server.*>}
> 
> I a not fully compos mentis right now, but should not the "." after 
> "Server" be "escaped" with a "\" (backslash)?

I am not including the period character anywhere in my regex - so there
is no need to escape one because there isn't one.

The periods in my regex are part of the wildcarding.  The dot means any
character followed by the + means 1, or more, instances of any character
or followed by the * means zero, or more, instances of any character.
So I *do* need the single dot to represent any character and then I
modify it a + or * to account for repeated instances of any character.
A dot by itself represents just 1 character at that particular position
in the string.

.	Any character that this position in string.
.+	1, or more, of any character starting at this position in string.
.*	0, or more, of any character starting at this position in string.

I am using the dot for what it is supposed to represent, and then
modifying it regarding count.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads