🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #205262

[Xnews] A tale of case sensitivity

#205262
From: Mike Dee
Date: Thu, 06 Sep 2007 01:10
44 lines
3481 bytes
Those of you know of the Xnews score file syntax, will know that is case insensitive by default. 
So if you want to score on an uppercase "A" and not a lowercase "a", you need to turn case 
sensitivity on to run that score.

What brought this about was seeing post subjects in all-caps, the "YOU MUST READ THIS NOW AND 
THIS IPOD WILL BE YOURS FOR FREE" kind of thing. - I don't even want to read the subject line of 
these posts...

Time to create a case sensitive score entry.

I remembered that case sensitivity could be toggled on/off in Xnews but had forgotten how, it 
was RTFM time again for me ;-)
And in the fine manual under Regular Expression, section:
8) Case sensitivity: "In the score file, you can make regex case sensitive by specifying 
Keyword= expression rather than Keyword: expression."

Cool, that was easy. Then I spent another 5 minutes or so trying to figure out the syntax of the 
expression to use. Nothing was looking too elegant (or working how I'd like) so off to the good 
old slrn regex repository I go. I use this for simple but really useful tips on regular 
expressions. Conversion to work on Xnews is easy too.

---------------------------------------
http://slrn.sourceforge.net/manual/slrn-FAQ-4.html
[...]
4.18 How do I score subjects that contain only uppercase characters?

Use something like:

Score: -9999
~Subject: \c[a-z]
---------------------------------------

Brilliant. I hadn't thought to use a NOT condition here. Converting for use in Xnews it looks 
exactly like this:

Score: -9999
~Subject= [a-z]

In other words, if a subject does not have one lowercase letter, then kill it dead.

Its the little things in life that bring about the greatest pleasures :-)

-- 
dee
Technical Details
Message-ID: <Xns99A37BDA4F03Aemteedee@203.26.24.228>
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!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <Xns99A37BDA4F03Aemteedee@203.26.24.228>
Subject: [Xnews] A tale of case sensitivity
Date: Thu, 06 Sep 2007 01:10:36 +0000
From: Mike Dee <mikedee@emteedee.invalid>
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!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail
Newsgroups: news.software.readers
Organization: Poor Boy
User-Agent: Xnews/2006.08.24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Face: $W<X:Uw4$"nTXRHqqZ=.|pFI@K,TNNH0i>-J; N5/yst7]cQb.o^L$oAhs-J!C
 AOUMQ^NHu3aTb9H8awW~4Y.LR`[o}Rz6Xf=^krb-AwUiM"7zA+QR<vWz'8>hKiTOyd]h
 z]7m=[nhuH{NMrE>~][PM`wSKd?TFV-.glh)>N
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUAAAA1eFXgkmf71L/7
 7qX////6Pj40AAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH1wMdBh4ZkpuYCAAAAPlJREFU
 eNqV0s2RwyAMBeAXQ+5xB4wq8AwNcHABuWz/rQRJ/AhssrtcPKPPegJjnIuF+vQrwC/QOidIK8AM
 6Qv4W0ADXADaeAO56RZijAeu4GIsMoHU47XDdfAWUlyAjHY6YwKXa+4KZYTsy0JyHFPFQjQdIxxo
 NESh1ccDJmeyzvsZX8D/CWBkAPkedV+LqBl6WPlYBdCOeFiAhdABBg4EvXiGLcj16QQivd8MiaHW
 N6JQARTaIXK9w8bdZQDxkiEKpP8uB00Q8JPXW+qahTPJS69nBk2SlgzS8DBJFrA/e5JkeSTe+WO3
 SdySgd/YGd4b9ZYBaIB/rw/aM8iUyl6QnQAAAABJRU5ErkJggg==
NNTP-Posting-Host: 60.240.97.180
X-Original-NNTP-Posting-Host: 60.240.97.180
X-Trace: dnews.tpgi.com.au!tpg.com.au 1189044636 60.240.97.180 (6 Sep 2007
Lines: 44