Thread View: news.software.readers
8 messages
8 total messages
Started by Michael N. Livshin
Thu, 09 Mar 1995 19:50
Help composing trn killfile regexp
Author: Michael N. Livshin
Date: Thu, 09 Mar 1995 19:50
Date: Thu, 09 Mar 1995 19:50
17 lines
1374 bytes
1374 bytes
Hi there!
How a shout-killing regexp might look?
I tried /^[^a-z]*$/:j, but it doesn't work.
Maybe I'm doing something really stupid - it's pretty late :)
tnx!
--
Michael N. Livshin | "Plain truth it when you question
Technion, CS dept. | When it's no answer the plain."
| Gentle Giant (Dissotiated Press, 03.25.93)
--
Michael N. Livshin | "Plain truth it when you question
Technion, CS dept. | When it's no answer the plain."
| Gentle Giant (Dissotiated Press, 03.25.93)
Re: Help composing trn killfile regexp
Author: Tim Pierce
Date: Thu, 09 Mar 1995 23:12
Date: Thu, 09 Mar 1995 23:12
26 lines
1635 bytes
1635 bytes
In article <D56v3v.HD1@discus.technion.ac.il>, Michael N. Livshin <c0905032@techst02.technion.ac.il> wrote: >Hi there! > >How a shout-killing regexp might look? >I tried /^[^a-z]*$/:j, but it doesn't work. ^ matches the beginning of the entire line, including the "Subject:" at the start of the header. Since the pattern-matching is case-insensitive, you'll also want to use a "c" modifier. And since I imagine you also want to kill all-caps subjects that start with "Re:", I'd suggest using two commands: /^Subject: [^a-z]*$/c:j /^Subject: Re:[^a-z]*$/c:j These two worked for me when I tried them out. If you use "=j" instead of "j", it'll also tell you briefly what it's killing. I find that handy. -- Unsolicited commercial electronic mail sent to this address will be proofread at a cost of $200/hour (one half-hour minimum).
Re: Help composing trn killfile regexp
Author: Paul Tomblin
Date: Fri, 10 Mar 1995 02:07
Date: Fri, 10 Mar 1995 02:07
24 lines
1772 bytes
1772 bytes
In a previous article, c0905032@techst02.technion.ac.il (Michael N. Livshin) said: >Hi there! > >How a shout-killing regexp might look? >I tried /^[^a-z]*$/:j, but it doesn't work. > >Maybe I'm doing something really stupid - it's pretty late :) Shout killing? What your regexp does is kill all posts in which the subject line has no lower case. However, depending on what your LOCALE is set to, this might not work. I remember getting bitten when working in the UK by the fact that on an RS/6000, grep '[A-Z]' actually matched all the upper case letters, PLUS all the lower case letters except one (either a or z, I can't remember which). I don't know if the regexp library used by trn cares about locale, but it's one thing to test, since you're coming from Israel which may have it's own ideas about alphabetic collating sequences. -- Paul Tomblin <a href=http://watt.oedison.com/~tomblinp/>My home page</a> Unlike Ewan Kirk, I am incapable of being nicey, british, and short.
Re: Help composing trn killfile regexp
Author: Larry W. Virden
Date: Fri, 10 Mar 1995 15:35
Date: Fri, 10 Mar 1995 15:35
8 lines
1226 bytes
1226 bytes
Of course, that regular expression will also kill subject with all numerics, or which are all punctuation. -- :s Larry W. Virden INET: larry.virden@cas.org :s <URL:http://www-bprc.mps.ohio-state.edu/cgi-bin/hpp/lvirden_sig.html> :s Unless explicitly stated to the contrary, nothing in this posting should :s be construed as representing my employer's opinions.
[Summary] Help composing trn killfile regexp
Author: Michael N. Livshin
Date: Tue, 14 Mar 1995 07:01
Date: Tue, 14 Mar 1995 07:01
29 lines
1917 bytes
1917 bytes
Larry W. Virden at <lvirden@cas.org> said :
>
>Of course, that regular expression will also kill subject with all
>numerics, or which are all punctuation.
It will kill anything with no lowercase letters in subject. I find it
pretty good heuristic.
And here is how it should be:
According to Mark Brader <msb@sq.com> :
> The regexp is matched against the entire Subject line, not just the
> subject. I haven't tested this, but it should work:
>
> /^Subject[ Re:]* [^a-z]*$/:j
>
> I always recommend the use of :=:j rather than :j, so that you see what
> you're killing in case you decide something is worth reading after all.
It seems to really work!
--
Michael N. Livshin | "Plain truth it when you question
Technion, CS dept. | When it's no answer the plain."
| Gentle Giant (Dissotiated Press, 03.25.93)
--
Michael N. Livshin | "Plain truth it when you question
Technion, CS dept. | When it's no answer the plain."
| Gentle Giant (Dissotiated Press, 03.25.93)
Re: [Summary] Help composing trn killfile regexp
Author: Tim Pierce
Date: Tue, 14 Mar 1995 19:20
Date: Tue, 14 Mar 1995 19:20
18 lines
1475 bytes
1475 bytes
In article <D5F4v1.3zt@discus.technion.ac.il>, Michael N. Livshin <c0905032@techst02.technion.ac.il> wrote: >And here is how it should be: > >According to Mark Brader <msb@sq.com> : >> The regexp is matched against the entire Subject line, not just the >> subject. I haven't tested this, but it should work: >> >> /^Subject[ Re:]* [^a-z]*$/:j Since trn's pattern-matcher is case-insensitive by default, that's likely to kill a lot more than just "shouting" patterns. -- Unsolicited commercial electronic mail sent to this address will be proofread at a cost of $200/hour (one half-hour minimum).
Re: [Summary] Help composing trn killfile regexp
Author: Michael N. Livshin
Date: Thu, 16 Mar 1995 10:46
Date: Thu, 16 Mar 1995 10:46
25 lines
1650 bytes
1650 bytes
I said :
>According to Mark Brader <msb@sq.com> :
>> The regexp is matched against the entire Subject line, not just the
>> subject. I haven't tested this, but it should work:
>>
>> /^Subject[ Re:]* [^a-z]*$/:j
>>
>> I always recommend the use of :=:j rather than :j, so that you see what
>> you're killing in case you decide something is worth reading after all.
>
>It seems to really work!
Ooops! It does work, but with one little correction:
/^Subject[ Re:]*[^a-z]*$/c:j
^^^
note the "c".
Tnx all!
--
Michael N. Livshin | "Plain truth it when you question
Technion, CS dept. | When it's no answer the plain."
| Gentle Giant (Dissotiated Press, 03.25.93)
Re: [Summary] Help composing trn killfile regexp
Author: Larry W. Virden
Date: Thu, 16 Mar 1995 16:30
Date: Thu, 16 Mar 1995 16:30
28 lines
1954 bytes
1954 bytes
> /^Subject[ Re:]*[^a-z]*$/c:j A note about this expression for those new to regular expressions. It does NOT mean Subject followed by an Re: . It means every line in the header which starts with the letters 'Subject' followed by 0 or more spaces, R's, e's, or :'s, in any order, in any number of repetitions, followed by 0 or more characters, not a lower case a-z, followed by the end of the line. Lines such as Subject: 123 ? Subject: eee: 1040 etc. will also be junked. It does however get things like Subject: Re: Re: Re: STOP IT! so it does the job quite nicely. I am not trying to criticize the nice job the folk did in coming up with it. But just be careful how you go about trying to extrapolate into new KILL file entries. -- :s Larry W. Virden INET: larry.virden@cas.org :s <URL:http://www-bprc.mps.ohio-state.edu/cgi-bin/hpp/lvirden_sig.html> :s Unless explicitly stated to the contrary, nothing in this posting should :s be construed as representing my employer's opinions.
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