Article View: news.software.readers
Article #66152Re: slrn
From: J.B. Nicholson-Owens
Date: Sat, 30 Sep 2000 00:00
Date: Sat, 30 Sep 2000 00:00
45 lines
2530 bytes
2530 bytes
Alan Flanary wrote:
> I use the regular expression below in Gravity to kill matches. I suppose
> this RE would also work in SLRN? [...]
>
> Subject contains reg. expr. "([A-Z][.,!;'`*-=_]){3,}"
This probably doesn't mean what you think it means. Right now, you're
matching the following quantity matched at least 3 times:
* Any capital alphabetic character followed by
* Period, comma, exclamation point, semicolon, apostrophe, back-apostrophe,
_asterisk through equal sign_ and underscore.
I think you meant to include the hyphen in that set of characters; moving it
to the front of the list will probably accomplish that because it can't be
mistaken as a range of characters.
Subject contains reg. expr. "([A-Z][-.,!;'`*=_]){3,}"
So, with slight modification, yes this can work in slrn:
Subject: \c[A-Z][-.,!;'`*=_][A-Z][-.,!;'`*=_][A-Z][-.,!;'`*=_]
S-Lang regular expressions don't support grouping, so the following won't
work (or, more accurately, this won't do what you might think it does):
Subject: \c\([A-Z][.,!;'`*-=_]\)\{3,\}
The leading "\c" turns on case sensitivity because slrn's regexes in
scorefiles are case-insensitive by default. In S-Lang regular expressions,
the curly braces need to be escaped. Finally, contrary to popular
assumption, metacharacters in character classes do _not_ need to be escaped
(repositioning certain characters within the class might be necessary,
however):
% echo 'a' | rgrep -i '[.]' # matches only a period--same as "\."
% echo 'a' | rgrep -i '[\.]' # S-Lang only--same as "[.]"
% echo 'a-to-z' | rgrep -i '[-bd]' # matches hyphen, b or d.
a-to-z
% echo 'a-to-z' | rgrep -i '[b-d]' # matches b *through* d.
%
Happy newsreading!
Technical Details
Message-ID:
<slrn8tcopl.1c4.jbn@next.forestfield.org>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:
<39d5a488@post.newsfeeds.com> <slrn8tbqv3.9p.removethis@gmx.net> <slrn8tbrnd.1li.Callus@kubrick.lan> <MPG.143fb673f5121809989684@news.easynews.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn8tcopl.1c4.jbn@next.forestfield.org> Subject: Re: slrn Date: Sat, 30 Sep 2000 00:00:00 +0000 From: jbn@forestfield.org (J.B. Nicholson-Owens) References: <39d5a488@post.newsfeeds.com> <slrn8tbqv3.9p.removethis@gmx.net> <slrn8tbrnd.1li.Callus@kubrick.lan> <MPG.143fb673f5121809989684@news.easynews.com> 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: 676000631 X-Trace: fu-berlin.de 970351486 18040153 208.216.67.173 (16 [35848]) Organization: Forest Field OmniMedia User-Agent: slrn/0.9.6.3 (Unix) Newsgroups: news.software.readers