Thread View: news.software.readers
3 messages
3 total messages
Started by Jeremy Mathers
Sat, 19 Apr 1997 00:00
trn: Want to KILL-file (globally) articles on regexp: !/[a-z]/
Author: Jeremy Mathers
Date: Sat, 19 Apr 1997 00:00
Date: Sat, 19 Apr 1997 00:00
41 lines
2262 bytes
2262 bytes
I have found that spammers like to put their subjects IN ALL UPPERCASE LIKE THIS. Therefore, it seems to me that a good entry for the global killfile would be something like: !/[a-z]/c:j I.e., if the subject doesn't contain at least one lower case letter, I don't want to see it. Note that this is a little more reliable than the "positive" search for /^[A-Z]$/, because it might also contain spaces, punctuation, etc. However, AFAIK, the above syntax isn't valid trn KILLFILE syntax. That is, there seems to be no negation operator. Is there a way? ************************************************************************ ". . . Honestly, I've never heard you sound so good - so peaceful and happy. Now you've got O.J. under control. He'll be leaving town in August. You just have to be really cool about Marcus until then." "The minute I said it, I knew why Nicole was on cloud nine. She'd seen Marcus that day, or she was going to see him. I knew how she got when she was going to be with him, and that's what I think was happening. I asked her, "Nic, ar you seeing Marcus?" She said, "Well, I've seen him." "Damn, Nic, don't you think O.J. is probably still having you followed?" "Well, I can't live my life for O.J., Faye. I decided I just can't do that anymore." (I don't know why this amuses me so, but it does...) - pynq@quads.uchicago.edu, who is still costing the net hundreds, if not thousands, of dollars, every time he posts - ************************************************************************ rwvpf wpnrrj ibf ijrfer
Re: trn: Want to KILL-file (globally) articles on regexp: !/[a-z]/
Author: Conrad Sabatier
Date: Sat, 19 Apr 1997 00:00
Date: Sat, 19 Apr 1997 00:00
15 lines
893 bytes
893 bytes
Try this: /^Subject: [Re: ]*[^a-z]*$/c:j:= It's important to use the "^" and "$" anchors, to indicate that the entire subject line must be scanned. The "c" is also important, to enable case- sensitivity. -- Conrad Sabatier http://www.neosoft.com/~conrads
Re: trn: Want to KILL-file (globally) articles on regexp: !/[a-z]/
Author: Mark Brader
Date: Sun, 20 Apr 1997 00:00
Date: Sun, 20 Apr 1997 00:00
28 lines
1629 bytes
1629 bytes
Jeremy Mathers: > I have found that spammers like to put their subjects IN ALL UPPERCASE > LIKE THIS. ... [I would like to try] > !/[a-z]/c:j > However, AFAIK, the above syntax isn't valid trn > KILLFILE syntax. That is, there seems to be no negation operator. Search for subject lines that don't have a lower case letter anywhere after the initial "Subject: " or "Subject: Re: " prefix. That is: /^Subject[: Re]*[^a-z]*$/c:j Yes, you need "Subject" in there explicitly. That's because trn does its match against the whole line (at least, trn 3.6 does), and you need to anchor the match at both ends to be sure that the [^a-z] test is applied to the relevant characters. [: Re]* is a little too broad, but this is unlikely to matter in practice. (Posted and emailed.) -- Mark Brader, msb@sq.com sed -e "s;??\\([-=(/)'<!>]\\);?\\\\?\\1;g" SoftQuad Inc., Toronto will fix them... -- Karl Heuer My text in this article is in the public domain.
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