🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #219443

Re: Regex to detect long subject lines

#219443
From: Ed
Date: Thu, 17 Apr 2008 04:42
53 lines
2867 bytes
Mike Dee <emteedee@invalid.invalid> wrote in
news:Xns9A816D4A1C13Bemteedee@193.201.53.67: 

> Ed <apostle@REMOVETHISpeculiar.homeip.net> wrote:
> 
>> I've been trying to come up with a regex that will trap overly
>> long subject lines but honestly I'm terrible at regular expression
>> syntax 
>  
> From the Xnews manual, under the section on Regular Expression:

I was too tired to think of it when I wrote that but I should have
mentioned that I need this for Hamster's kill file, not Xnews. 

> 3) Quantifiers (match how many times)
> 
>    *     Match 0 or more times
>    +     Match 1 or more times
>    ?     Match 1 or 0 time (i.e., optionally match)
>    {n}   Match exactly n times
>    {n,}  Match at least n times
>    {n,m} Match at least n but not more than m times

These same rules are in Hamster's helpfile.

>> I'd like to be able to trap any message with a subject line more than
>> 60 characters long 
> 
> The following score, based on the above rules:
> 
> %%-----------------------------
> 
> [.]
> 
>     Score: -100
>       Subject: .{60,}
> 
> %%-----------------------------
> 
> The above will do what you want.

and the same thing according to hamster's helpfile:

[news.group]
-9999 Subject: ".{60,}"

Yet messages with subject lines longer than 60characters are not getting
hit with it. 



-- 
http://blogdoofus.com
Technical Details
Message-ID: <Xns9A82F11EBAE112362352@127.0.0.1>
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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.centurytel.net!news.centurytel.net.POSTED!not-for-mail
References: <Xns9A808EE42A7682362352@127.0.0.1> <Xns9A816D4A1C13Bemteedee@193.201.53.67>

Show Full Headers
Complete Article Headers
Message-ID: <Xns9A82F11EBAE112362352@127.0.0.1>
Subject: Re: Regex to detect long subject lines
Date: Wed, 16 Apr 2008 23:42:11 -0500
From: Ed <apostle@REMOVETHISpeculiar.homeip.net>
References: <Xns9A808EE42A7682362352@127.0.0.1> <Xns9A816D4A1C13Bemteedee@193.201.53.67>
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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.centurytel.net!news.centurytel.net.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 17 Apr 2008 22:52:24 -0500
Newsgroups: news.software.readers
User-Agent: Xnews/2006.08.24 Hamster/2.0.7.0
X-PGP-Key: 0x84D46604
X-PGP-Key-fingerprint: DA03 1EA4 7F5D DF74 B89F E871 757E 627C 84D4 6604
Lines: 53
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 72.161.77.245
X-Trace: sv3-f7PYLb1/1IQsngNmVYGT113wGcMGuHMF8RQokalvvCsrnXN8M1jniZ6tyr5SyXFtedkGM1cR4lxRaTg!W02Oe1yG+VLAYUfpjV05GhojRkFEZdYAAKv3Ghv7tacr4erUvpyzKE8PzDU9qjd9FfW7OFT9YCLL!zF1q/IgoZdEw2hMEaRVTQm8cFQ==
X-Complaints-To: abuse@centurytel.net
X-DMCA-Complaints-To: abuse@centurytel.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.3.39