🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Conrad Sabatier Sun, 13 Jul 1997 00:00
trn -- killfile/regular expressions question
#35094
Author: Conrad Sabatier
Date: Sun, 13 Jul 1997 00:00
17 lines
1023 bytes

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.

This is under FreeBSD 2.2-STABLE with trn 4 test 58.

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

Re: trn -- killfile/regular expressions question
#35276
Author: Natalie Ramsey
Date: Fri, 18 Jul 1997 00:00
38 lines
1708 bytes
: 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.

: This is under FreeBSD 2.2-STABLE with trn 4 test 58.

: Any ideas, anyone?

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'm using strn 0.9.2 on HP-UX (of course :-) 9.03.  

I could use ideas as well.  

Blessings,
Natalie

--
Natalie Overstreet Ramsey             ----               <natalie@col.hp.com>  
Please cc all replies by email as site expiration is measured in nanoseconds.
     All quotes of this article must include the following disclaimer:  
 The author of this article is not speaking for the Hewlett-Packard Company.   


Re: trn -- killfile/regular expressions question
#35341
Author: 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"

Re: trn -- killfile/regular expressions question
#35377
Author: Natalie Ramsey
Date: Mon, 21 Jul 1997 00:00
45 lines
2176 bytes
In article <jgfrq5.lv4.ln@dolphin.neosoft.com>,
Conrad Sabatier <conrads@neosoft.com> wrote:
>In article <5qokt9$ksd$1@nonews.col.hp.com>,
>Natalie Ramsey <natalie@col.hp.com> wrote:
>>
>>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:
>
>,.*,.*,.*,
>

Actually, I did try that.  My problem is that I'm trying to use this
in the scorefile rather than the killfile, and it doesn't seem to
understand the * quantifier either.  

-1 pattern followup-to: .* 

is the current (desperation/experimentation) version of the line, and
it yields no matches.  I've also tried .\*, which also doesn't work.  

Would slrn allow me to do this in a reasonable fashion, if strn won't?  

Blessings,
Natalie

-- 
Natalie Overstreet Ramsey             ----               <natalie@col.hp.com>  
Please cc all replies by email as site expiration is measured in nanoseconds.
     All quotes of this article must include the following disclaimer:  
 The author of this article is not speaking for the Hewlett-Packard Company.   

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads