Article View: news.software.readers
Article #45664Re: Attack of the Killer Articles pt. 2: Need help with regular expression
From: Tom B.
Date: Sun, 03 Jan 1999 00:00
Date: Sun, 03 Jan 1999 00:00
45 lines
2327 bytes
2327 bytes
Roy DeRousse posted ...
> Fortunately, the spammers are consistent with their subjects. Here is an
> example:
>
> io7y S E E M Y G I R L F R I E N D
>
> They start off with some gibberish, followed by some spaces, followed by
> a double-spaced subject in caps. I want to create a regular expression
> that does this: "Mark article as read if subject contains a capital
> letter, followed by a space, followed by a capital letter, followed by
> two spaces, followed by a capital letter, followed by a space, followed
> by a capital letter." I am having trouble creating such an expression.
> Here is onen of my attempts:
>
> Subject contains reg. expr. "[A-Z][ ][A-Z][ ][ ][A-Z][ ][A-Z]"
>
> It didn't find any matches.
When I entered your reg exp in a rule and tried on a test post it
worked for me. Have you tried to test it first? I usually set the
rule action to tag the article and fire it manually before I use it.
That way I can what it hits. If it works you may need to check that
you have a rule action selected and that it is enabled for incoming.
I usually like to test a rule more thoroughly before I post but I
also tried these which seemed to work, the first is yours just
modified slightly to hit exactly 2 spaces.
Subject contains reg. expr. "[A-Z][ ][A-Z][ ]{2}[A-Z][ ][A-Z]"
Subject contains reg. expr. "[A-Z]{1} {1}[A-Z]{1} {2}[A-Z]{1} {1}[A-
Z]{1}"
I didn't test these too much, email me if they don't work or need
refined. If you email me include a newsgroup name where I can test
it better.
Happy New Year
--
Tom B. NAPLES, FL
nfn03862@naples.net
Technical Details
Message-ID:
<MPG.10f95847890147d2989851@news.naplesfl.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<MPG.10f8e9c6277485ec989750@news.earthlink.net>Show Full Headers
Complete Article Headers
Message-ID: <MPG.10f95847890147d2989851@news.naplesfl.net> Subject: Re: Attack of the Killer Articles pt. 2: Need help with regular expression Date: Sun, 03 Jan 1999 00:00:00 +0000 From: nfn03862@naples.net (Tom B.) References: <MPG.10f8e9c6277485ec989750@news.earthlink.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 428316076 Reply-To: nfn03862@naples.net NNTP-Posting-Date: Sun, 03 Jan 1999 10:35:35 EDT Newsgroups: news.software.readers