Article View: news.software.readers
Article #35373Re: Pattern matching and trn
From: Jeremy Mathers
Date: Mon, 21 Jul 1997 00:00
Date: Mon, 21 Jul 1997 00:00
51 lines
3259 bytes
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
Technical Details
Message-ID:
<EDp0wI.8pH@midway.uchicago.edu>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:
<5q6q0i$7ia$1@joplin.fmed.edu.uy> <5qqlg3$k81@mine.informatik.uni-kiel.de> <otfrq5.lv4.ln@dolphin.neosoft.com> <5qvrfp$m3t@mine.informatik.uni-kiel.de>Show Full Headers
Complete Article Headers
Message-ID: <EDp0wI.8pH@midway.uchicago.edu> Subject: Re: Pattern matching and trn Date: Mon, 21 Jul 1997 00:00:00 +0000 From: pynq@midway.uchicago.edu (Jeremy Mathers) References: <5q6q0i$7ia$1@joplin.fmed.edu.uy> <5qqlg3$k81@mine.informatik.uni-kiel.de> <otfrq5.lv4.ln@dolphin.neosoft.com> <5qvrfp$m3t@mine.informatik.uni-kiel.de> 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: 258082548 Sender: news@midway.uchicago.edu (News Administrator) X-Nntp-Posting-Host: ellis-nfs.uchicago.edu Organization: Juli! Juli! Juli! The Juli Wood Fan Club. Newsgroups: news.software.readers