🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #6552

Re: TRN: Killfile Question

#6552
From: Wayne Davison
Date: Wed, 17 Nov 1993 19:39
33 lines
1880 bytes
According to Jeremy Mathers <pynq@midway.uchicago.edu>:
> /^From.*\(User1\|User2\|User3\)/h+
> [...is illegal...]
> Now, I ask you, of what value is the \( ... \) construct if not for this?

The \( ... \) construct can be used for tagging text for reuse, like this
construct that formats the output of the '=' command.  Note the use of %1:

-ESUBJLINE="\
%(%(%f=(\\(..*\\))$?%1 <%t>:%t)               =^\\(...............\\)?%1) \
(%(   %[lines]=\\(...\\)$?%1)) \
%(%[subject]=^\\(....................................................\\)?\
%1:%[subject])"

However, I agree with you that a better regex routine that would handle
\| inside of parens is very desirable.  I know of one fellow who has
plugged in an alternate regex package into trn (trn was modified in
version 3.0 to make this easier) but I've not yet gotten a replacement
that is fully compatible (and freely redisributable is also important).

In the meantime, you could install trn 3.3 and use the construct:

/User1\|User2\|User3/f:+

to select multiple people in the from line.  The generic form is also
available:

/String1\|String2\|String3/Hheader-line:+

which selects the strings on the specified "Header-Line:" in the header.
-- 
Wayne Davison
davison@borland.com
Technical Details
Message-ID: <CGnIMn.734@borland.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!gatech!concert!decwrl!borland.com!davison
References: <1993Nov8.175215.6637@midway.uchicago.edu>

Show Full Headers
Complete Article Headers
Message-ID: <CGnIMn.734@borland.com>
Subject: Re: TRN: Killfile Question
Date: Wed, 17 Nov 1993 19:39:59 GMT
From: davison@borland.com (Wayne Davison)
References: <1993Nov8.175215.6637@midway.uchicago.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!gatech!concert!decwrl!borland.com!davison
Newsgroups: news.software.readers
Organization: Borland International
Lines: 33