Article View: news.software.readers
Article #45660Re: Gravity: Attack of the Killer Articles pt. 2: Need help with regular expression
From: Roy DeRousse
Date: Sun, 03 Jan 1999 00:00
Date: Sun, 03 Jan 1999 00:00
48 lines
2807 bytes
2807 bytes
Thanks for the replies, Tom and Greg. I probably wouldn't have even
looked at my note since it didn't have Gravity in the header (d'oh!).
Tom, your reply gave me the clue that I needed. Like you, I test my
rules manually first. Why did it work for you and not for me, then? The
answer is that I was looking for the wrong thing! The article heading
didn't look _exactly_ as it's quoted below. There are actually multiple
spaces before and after "M Y." They just looked like double spaces in
Gravity. Upon realizing this, I came up with this rule:
Subject contains reg. expr. "[A-Z][ ][A-Z][ ]{2,}[A-Z][ ][A-Z]"
... and it works great! Thanks again!
In article <MPG.10f95847890147d2989851@news.naplesfl.net>,
nfn03862@naples.net says...
> 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.
--
Have fun!
Roy DeRousse (relayer@iname.com)
St. Louis, Missouri, USA
Technical Details
Message-ID:
<MPG.10f9d556662bce31989751@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-mailReferences:
<MPG.10f8e9c6277485ec989750@news.earthlink.net> <MPG.10f95847890147d2989851@news.naplesfl.net>Show Full Headers
Complete Article Headers
Message-ID: <MPG.10f9d556662bce31989751@news.earthlink.net> Subject: Re: Gravity: Attack of the Killer Articles pt. 2: Need help with regular expression Date: Sun, 03 Jan 1999 00:00:00 +0000 From: relayer@iname.com (Roy DeRousse) References: <MPG.10f8e9c6277485ec989750@news.earthlink.net> <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-mail X-Deja-AN: 428481723 X-Posted-Path-Was: not-for-mail X-ELN-Date: 4 Jan 1999 01:32:01 GMT X-ELN-Insert-Date: Sun Jan 3 17:35:05 1999 Organization: EarthLink Network, Inc. Newsgroups: news.software.readers