home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / news / newusers / question / 5959 < prev    next >
Encoding:
Text File  |  1993-01-22  |  2.6 KB  |  65 lines

  1. Newsgroups: news.newusers.questions
  2. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!termo.unit.no!bgitv
  3. From: bgitv@termo.unit.no (Bard Grimsmo)
  4. Subject: Re: rn KILL file FAQ
  5. Message-ID: <1993Jan22.091649.28183@ugle.unit.no>
  6. Sender: news@ugle.unit.no (NetNews Administrator)
  7. Organization: SINTEF, The Norwegian Institute of Technology
  8. References: <killfile.faq_727569363@syrinx.umd.edu> <93021.115925J5J@psuvm.psu.edu>
  9. Date: Fri, 22 Jan 93 09:16:49 GMT
  10. Lines: 53
  11.  
  12. In article <93021.115925J5J@psuvm.psu.edu> John A. Johnson <J5J@psuvm.psu.edu> writes:
  13. >I sent the following note to Leanne a few days ago and haven't heard back
  14. >yet, so I thought I post this question publically to see if anyone might
  15. >have an answer:
  16. >----------------------------original note follows---------------------
  17. >Date:    17 January 1993, 15:09:57 EST
  18. >From:    John A. Johnson            (814) 375-4774  J5J      at PSUVM
  19. >To:      phillips at syrinx.umd.edu
  20. >Subject: Re: rn KILL file FAQ
  21. >
  22. >I found your article on KILL files helpful, but I have a question it did not
  23. >answer.  Suppose I want to search for and junk articles with a pattern that
  24. >might appear in a larger pattern I do not want to junk?  For example,
  25. >attempting to junk articles with "male" in the header with
  26. >
  27. >/male/h:j
  28. >
  29. >will also junk articles with "female" in the header.  How would I prevent
  30. >this?
  31. >
  32. >John A. Johnson (j5j@psuvm.psu.edu)
  33. >
  34. I think this is an important FAQ.
  35.  
  36. In the man pages of trn I found, see below,  that \b matches word boundaries.
  37. (However in the vi editor (I do not know ed) word boundaries are \< and \>).
  38.  
  39. I have not done a test yet, but I would trie,
  40.  
  41. /\bmale\b/h:j
  42.  
  43. From man trn:
  44.  
  45.        Regular Expressions
  46.  
  47.        The patterns used in article searching are regular expres-
  48.        sions such as  those  used  by  ed(1).   In  addition,  \w
  49.        matches  an  alphanumeric  character  and \W a nonalphanu-
  50.        meric.  Word boundaries may be matched  by  \b,  and  non-
  51.        boundaries  by \B.  The bracketing construct \( ... \) may
  52.        also be used, and \digit matches the  digit'th  substring,
  53.        where  digit  can  range from 1 to 9.  \0 matches whatever
  54.        the last bracket match matched.  Up to 10 alternatives may
  55.        given  in a pattern, separated by \|, with the caveat that
  56.        \( ... \| ... \) is illegal.
  57.  
  58. Bard
  59. -- 
  60. Bard Grimsmo     |Mail: SINTEF/Varmeteknikk         |Home: Schives Gate 7
  61. Dr.Ing           |      7034 Trondheim, Norway      |      N-7030 Trondheim
  62. Research Engineer|Phone: +47 7 592505               |      Norway
  63. SINTEF Division  |Fax:   +47 7 944513               |Home phone: +47 7 523801
  64. Termodynamics    |E-mail: Bard.Grimsmo@termo.unit.no|-rn-rn-rn-rn-rn-rn-rn-rn
  65.