home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: news.newusers.questions
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
- From: dattier@ddsw1.mcs.com (DWT)
- Subject: Re: rn KILL file FAQ
- Message-ID: <C19vrs.7C8@ddsw1.mcs.com>
- Date: Fri, 22 Jan 1993 20:33:27 GMT
- References: <killfile.faq_727569363@syrinx.umd.edu> <93021.115925J5J@psuvm.psu.edu>
- Organization: Contributor Account at ddsw1, Chicago, Illinois 60657
- Lines: 40
-
- John A. Johnson <J5J@psuvm.psu.edu> wrote in <93021.115925J5J@psuvm.psu.edu>:
-
- | I found [Leanne Phillips's] article on KILL files helpful, but I have a
- | question it did not answer. Suppose I want to search for and junk articles
- | with a pattern that might appear in a larger pattern I do not want to junk?
- | For example, attempting to junk articles with "male" in the header with
- |
- | /male/h:j
- |
- | will also junk articles with "female" in the header. How would I prevent
- | this?
-
- It's similar to the all-but junking method for which I wrote the example that
- Leanne offers to mail out:
-
- /female/h:=:M
- /male/h:j
-
- That's one way. There's a more direct way that doesn't require returning to
- the group nor using the Y command [I'll simplify this under the assumption
- that the words will appear in the content of a header line and not in its
- name and therefore will not be left-anchored]:
-
- /[^e]male/h:j
- /[^f]emale/h:j
-
- In case you can't make that assumption, add two lines (but four scans are
- slower than two, so you might want to use the first method instead):
-
- /[^e]male/h:j
- /[^f]emale/h:j
- /^male/h:j
- /^.male/h:j
-
- They may be confusing to read because an unescaped caret means "not" inside
- brackets but "left anchor" as the first character in a regular expression.
- Remember that regexps in rn and trn kill files are case-insensitive.
-
- David W. Tamkin Box 59297 Northtown Station, Illinois 60659-0297
- dattier@ddsw1.mcs.com CompuServe: 73720,1570 MCI Mail: 426-1818
-