🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #35341

Re: trn -- killfile/regular expressions question

#35341
From: Conrad Sabatier
Date: Sat, 19 Jul 1997 00:00
51 lines
2347 bytes
In article <5qokt9$ksd$1@nonews.col.hp.com>,
Natalie Ramsey <natalie@col.hp.com> wrote:
>: I've tried using the following:
>
>: /.\{3,\}/j
>
>: To kill any article containing three consecutive occurrences of the same
>: character (e.g., XXX, !!!, etc.).  Unfortunately, it doesn't work.
>
>I've got the same sort of problem in strn -- I'm trying to write 
>scorefile expressions that catch followups to more than 4 groups, 
>using 
>
>-10 pattern followup-to: \(,[^,]*\)\{4,\}
>
>or something like it (I'm typing from memory here), and in the 
>experimentation I've done, strn doesn't seem to understand quantifiers
>at all.  It won't even match \w\{1\} to anything that has a followup-to
>line.  
>
>I could use ideas as well.  

Well, *your* problem is easily solved by using the regular expression:

,.*,.*,.*,

I use a similar expression to kill overly-crossposted articles, using the
Xref header:

:.*:.*:.*:.*:.*:

The above kills anything crossposted to six or more groups.

Still, it sure would be nice if the {} operators would work the way
they're supposed to.

I'm wondering if there's some compile/link trick involved, i.e., linking
to a different regex library or specifying a different set of flags to
the regex routines.  For that matter, I'm not even sure which regex lib
trn uses by default.  :-)

I'd *really* like it if trn followed the same regex grammar as, say, grep,
where fewer "\" escapes would be necessary (such as before "|").

Anyone?
-- 
Conrad Sabatier			| FreeBSD user since 06/96, because...
http://www.neosoft.com/~conrads	| "The best things in life are free"

Technical Details
Message-ID: <jgfrq5.lv4.ln@dolphin.neosoft.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
References: <tgsaq5.nfg.ln@dolphin.neosoft.com> <5qokt9$ksd$1@nonews.col.hp.com>

Show Full Headers
Complete Article Headers
Message-ID: <jgfrq5.lv4.ln@dolphin.neosoft.com>
Subject: Re: trn -- killfile/regular expressions question
Date: Sat, 19 Jul 1997 00:00:00 +0000
From: conrads@neosoft.com (Conrad Sabatier)
References: <tgsaq5.nfg.ln@dolphin.neosoft.com> <5qokt9$ksd$1@nonews.col.hp.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: 257873913
Organization: NeoSoft, Inc.
Reply-To: conrads@neosoft.com (Conrad Sabatier)
Newsgroups: news.software.readers
Originator: conrads@neosoft.com (Conrad Sabatier)