🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
6 messages
6 total messages Started by Santiago Fri, 11 Jul 1997 00:00
Pattern matching and trn
#35065
Author: Santiago
Date: Fri, 11 Jul 1997 00:00
24 lines
994 bytes

I have this problem:

8<------------------------------------------------------
misc.test          1 article

a Santiago          1  44234235235235235

/[abcdefghijklmnopqrstuvwxyz]/:=
61      44234235235235235
Done
8<------------------------------------------------------

It should not match a totally numeric subject, should it? Am I messing
it up? Advice, suggestions, even flames welcomed. Nothing can be worst
than spammers.

Saludos,
	Santiago.

PD: Care to share some killfiles?

Re: Pattern matching and trn
#35074
Author: Conrad Sabatier
Date: Sat, 12 Jul 1997 00:00
34 lines
1684 bytes
In article <5q6q0i$7ia$1@joplin.fmed.edu.uy>,
Santiago <tach@joplin.fmed.edu.uy> wrote:
>
>I have this problem:
>
>8<------------------------------------------------------
>misc.test          1 article
>
>a Santiago          1  44234235235235235
>
>/[abcdefghijklmnopqrstuvwxyz]/:=
>61      44234235235235235
>Done
>8<------------------------------------------------------
>
>It should not match a totally numeric subject, should it? Am I messing
>it up? Advice, suggestions, even flames welcomed. Nothing can be worst
>than spammers.

Are you sure that the above is not the result of some other expression in
your killfile?

Anyway, there *is* [a-z], you know.  :-)

What is your purpose in using the above expression anyway?  To echo any
subject that has a letter in it???  That's all it does, you know.

P.S.  If you want to see *my* killfile, it's gonna cost you.  :-)
-- 
Conrad Sabatier			| FreeBSD user since 06/96, because...
http://www.neosoft.com/~conrads	| "The best things in life are free"

Re: Pattern matching and trn
#35076
Author: Denis McKeon
Date: Sat, 12 Jul 1997 00:00
80 lines
3050 bytes
[followup both posted and mailed to poster]

In <5q6q0i$7ia$1@joplin.fmed.edu.uy> Santiago wrote:
>
>I have this problem:
>
>8<------------------------------------------------------
>misc.test          1 article
>
>a Santiago          1  44234235235235235
>
>/[abcdefghijklmnopqrstuvwxyz]/:=
>61      44234235235235235
>Done
>8<------------------------------------------------------
>
>It should not match a totally numeric subject, should it? 

Perhaps it is matching on the letters in 'Subject:'?
Try matching 'ubj' and see what happens.

As for trading killfiles, here's part of what I use as a global trn
command (kill) file, parts of which originated from Tim Pierce and 
Tom Christiansen.  See the trn man page for details. Enjoy.

&-t
X&-t
&-hLines
X&-hLines
X&-OtC
#&-OaD
# X&-x6slmd
# X&-x6nld
X&-x6smn
# X&-x6s
X&-EHIDELINE="^ *[+=\|}:>#\/\\)]..."
# X&-EHIDELINE="^[+=\|}:>#\/\\\*]..."
# HIDELINE rejects: * - (
&-t
#
# Kill articles with ESC !! $$ ***** or please read in subject
/\|!!\|\$\$\|\*\*\*\*\*\|please read/:j=
# Kill articles with no or unwanted subject line
/^Subject: *((*None)*\|\bTest\b\|[(<]*No subject[)>]*)* *$/:j=
#
/Chance.*lifetime\| Don.t miss it/:j=
/FREE\|PGG\|MAKE.*MONEY\|MONEY.*FAST\|NEED.*CASH\|, *000\|0000\|MILLION/:j=
/GUARANT\|CREDIT REPAIR\|LONELY\|IMMEDIATE.*PROFITS\|MESSAGE.*LOVE/:j=
/TRAVEL.*WORLD\|URGENT.*PETITION\|CONTEST\|WORK.*HOME\|SPARE.*TIME/:j=
/ADULTS ONLY- Check this out/:j:=
/ADULT\|NAKED\|CHEAP.*PHONE.*INTERNATION\|FABULOUS.*INCOME\|READ THIS/:j=
/Advertise Your Product\|Mailloop\|Send Bulk Email/:j=
#
# endless sex ads
/(School\|blowjob\|Girl\|young\|hot\|Teen\|tight\|twat\|anal\|gay\pics)\.jpg/:j=
/\.(jpg\|gif\|wav)/:j=
#
/good.*site\|my.*page\|new home page\|new *web *site\|new *site/:j=
# Kill other articles with all caps subject lines
/^Subject:[Re: ]*[^a-z]*$/c:j=
# W R I T T E N   L I K E   T H I S
/ [^ ] [^ ] [^ ] [^ ] [^ ] [^ ]/:j=
/http:\|\bhref\b\|\.html\b/
#
# 6 colons -> cross-posted to 5 or more groups
# Xref: server g1:N g2:N g3:N  ...
/:.*:.*:.*:.*:.*:/HXref:,=
# cross-posted to N or more alt.* groups existing on this server
&+t
/ alt\..* alt\..* alt\./HXref:j=
#
# Kill articles with blatantly broken From: addresses
#
/^[^@]*$\|Fullname\|Real Name\|username/f:j:=

-- 
Denis McKeon

Re: Pattern matching and trn
#35127
Author: Santiago
Date: Mon, 14 Jul 1997 00:00
44 lines
1862 bytes
In article <5q844v$7vc$1@sloth.swcp.com>,
Denis McKeon <Dmckeon@swcp.com> wrote:
>[followup both posted and mailed to poster]

Didn't got it; seems that my UUCP connection is mostly broken for
mails :(.

>>It should not match a totally numeric subject, should it? 
>
>Perhaps it is matching on the letters in 'Subject:'?
>Try matching 'ubj' and see what happens.

Thanks, that was it. I had assumed it stripped the header.
Live'n learn.

>
>As for trading killfiles, here's part of what I use as a global trn
>command (kill) file, parts of which originated from Tim Pierce and 
>Tom Christiansen.  See the trn man page for details. Enjoy.

(cool global KILL snipped)

Wow. You covered most of my killfile. My contributions:


# Stop newsgroup bombing i.e. Silly subject (0001/1708).. ad nauseaum
/([0-9][0-9][0-9][0-9]\/[0-9][0-9][0-9][0-9])$/:j=
/([0-9][0-9][0-9]\/[0-9][0-9][0-9])$/:j=

# Filter phone ads.
/1[^0-9][89]0[09][^0-9][0-9]/:j=

# Only do this if you aren't on a modem connection! Same pattern as
# before, but searches through the entire article. Overview won't save
# you.

/1[^0-9][89]0[09][^0-9][0-9]/a:j=

-- 
UUCP link under construction. You can reach me at arraga(at)hc.edu.uy


Re: Pattern matching and trn
#35323
Author: Conrad Sabatier
Date: Sat, 19 Jul 1997 00:00
34 lines
2015 bytes
In article <5qqlg3$k81@mine.informatik.uni-kiel.de>,
Claus Assmann <ca+posting@informatik.uni-kiel.de> wrote:
>
>I tried this:
>/(School\|blowjob\|Girl\|young\|hot\|Teen\|twat\|anal\|gay).*\.jpg/c:j= 
>
>and it kills articles like:
>11517 hotjava question? 
>166884 Re: Teenage Web Designers 
>(I ran trnkill from the support directory).
>
>What's wrong with the RE? Doesn't it require that ".jpg" occurs
>somewhere in the string for a match? The trn man page (I use
>4.0-test56) says it uses REs just like ed(1) with some additions.
>If I use /hot.*\.jpg/ it matches neither line.

No, actually the above says to match "(School" or "blowjob" or ...
or "gay).*\.jpg", because the parentheses are not escaped with "\", so
they're taken as literals.

Unfortunately, I've never been able to get the type of subexpression
matching you're trying to do to work in trn.  Frankly, there are a few
things in trn's regular expression handling that I just plain don't
understand, and this is one of them (along with why the {} operators don't
work, either).

I sure wish someone could clear up this mystery for us.  Wayne?  You
there?  Anyone?
-- 
Conrad Sabatier			| FreeBSD user since 06/96, because...
http://www.neosoft.com/~conrads	| "The best things in life are free"

Re: Pattern matching and trn
#35373
Author: Jeremy Mathers
Date: Mon, 21 Jul 1997 00:00
51 lines
3259 bytes
In article <5qvrfp$m3t@mine.informatik.uni-kiel.de>,
Claus Assmann <ca+posting@informatik.uni-kiel.de> wrote:
...
>Esp. since the manual says:
>            Up  to  10  alternatives  may given in a pattern,
>     separated by \|, with the caveat  that  \( ... \| ... \)  is
>     illegal.

Isn't this a bummer?  Being unable to nest alternation kinda ruins the whole
effect, doesn't it?

>So this won't work, but must be rewritten to (shortened...):
>/School.*\.jpg\|blowjob.*\.jpg\|Girl.*\.jpg\|young.*\.jpg\|hot.*\.jpg\|Teen.*\.jpg/c:j= 
>which becomes hard as soon as they use also other formats (.gif).
>
>Too bad, it would be nice if trn understands POSIX 1003.2 style
>extended regular expressions (e.g., from Henry Spencer).
>Why must every software use its own style of (E)REs?

Well, the short answer is that [t]rn behaves differently then most of the
"standard Unix tools" because it (rn) was originally developed before the
standards were established.  The command set is all weird; the pager works
completely different than less/more.  I hate the fact that seemingly natural
keystrokes (such as 'u') when issued in the pager mode cause truly bizarre
outcomes (such as unsubscribing you from the group).  The weirdness of the
RE parser (killfile language) is, however, the most annoying part of it.

But, the fact is, we all have learned it (the trn command set) and we
live with it.  Changing it now would create shock waves.  To implement a
better killfile language now would have to be implemented as a switch ("use
old" - "use new").  Probably not much interest in doing it among the people
who own the code.

But, yeah, it (the current trn RE parser) is completely nuts.  It
drives me crazy when RE implementations require the \ to make a
character special.  I understand why it is thought necessary in some
cases, but my gut feeling is that \[char] should *always* match [char]
and should never have a special meaning.  The solution is probably that
there should be *no* unadorned "magic" characters - everything should
be special iff preceded by a magic (I.e., "\") character.

************************************************************************
I am master of my domain.

	- pynq@quads.uchicago.edu, who is still costing the net
	  hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer

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