home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: news.newusers.questions
- Path: sparky!uunet!mcsun!sunic!ugle.unit.no!termo.unit.no!bgitv
- From: bgitv@termo.unit.no (Bard Grimsmo)
- Subject: Re: rn KILL file FAQ
- Message-ID: <1993Jan22.091649.28183@ugle.unit.no>
- Sender: news@ugle.unit.no (NetNews Administrator)
- Organization: SINTEF, The Norwegian Institute of Technology
- References: <killfile.faq_727569363@syrinx.umd.edu> <93021.115925J5J@psuvm.psu.edu>
- Date: Fri, 22 Jan 93 09:16:49 GMT
- Lines: 53
-
- In article <93021.115925J5J@psuvm.psu.edu> John A. Johnson <J5J@psuvm.psu.edu> writes:
- >I sent the following note to Leanne a few days ago and haven't heard back
- >yet, so I thought I post this question publically to see if anyone might
- >have an answer:
- >----------------------------original note follows---------------------
- >Date: 17 January 1993, 15:09:57 EST
- >From: John A. Johnson (814) 375-4774 J5J at PSUVM
- >To: phillips at syrinx.umd.edu
- >Subject: Re: rn KILL file FAQ
- >
- >I found your 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?
- >
- >John A. Johnson (j5j@psuvm.psu.edu)
- >
- I think this is an important FAQ.
-
- In the man pages of trn I found, see below, that \b matches word boundaries.
- (However in the vi editor (I do not know ed) word boundaries are \< and \>).
-
- I have not done a test yet, but I would trie,
-
- /\bmale\b/h:j
-
- From man trn:
-
- Regular Expressions
-
- The patterns used in article searching are regular expres-
- sions such as those used by ed(1). In addition, \w
- matches an alphanumeric character and \W a nonalphanu-
- meric. Word boundaries may be matched by \b, and non-
- boundaries by \B. The bracketing construct \( ... \) may
- also be used, and \digit matches the digit'th substring,
- where digit can range from 1 to 9. \0 matches whatever
- the last bracket match matched. Up to 10 alternatives may
- given in a pattern, separated by \|, with the caveat that
- \( ... \| ... \) is illegal.
-
- Bard
- --
- Bard Grimsmo |Mail: SINTEF/Varmeteknikk |Home: Schives Gate 7
- Dr.Ing | 7034 Trondheim, Norway | N-7030 Trondheim
- Research Engineer|Phone: +47 7 592505 | Norway
- SINTEF Division |Fax: +47 7 944513 |Home phone: +47 7 523801
- Termodynamics |E-mail: Bard.Grimsmo@termo.unit.no|-rn-rn-rn-rn-rn-rn-rn-rn
-