Article View: news.software.readers
Article #12158Re: How to Search body of messages in group(s)
From: Peter Kappesser
Date: Thu, 27 Oct 1994 11:39
Date: Thu, 27 Oct 1994 11:39
29 lines
2211 bytes
2211 bytes
Recently in news.software.readers, abramson@lhc.nlm.nih.gov.nlm.nih.gov (Alicia Abramson) wrote: >Is there a news reader that supports string searching in the body of >messages both within a single newsgroup, or within a bunch of newsgroups >at the same time? I'm doing a project where I'd like to analyze how >often certain strings appear in newsgroups. > trn allows you to search for strings within a given newsgroup with a command of the form /<pattern>/a:<command> The <pattern> is a regular expression we know and love. The 'a' modifier tells trn to search entire articles. Several <command>s are available; you can save articles that hit to a file (either one big file for everything, or separate files for each article); or even pipe the article into a program for further processing (e.g. your string analysis). I have a shell script that will grab Elf Sternberg's "Journal Entries" stories, looks at the story's title in the Subject: line, and saves it to a MS-DOS format filename based on the title's "date". One hitch I can think of is: if your string is a series of words, and the phrase is broken at the end of a line, it may not hit. You may have to use a complicated regular expression which will match words separated by either space, newline, or some combination. -- pjkappes@mailbox.syr.edu (Peter Kappesser)
Technical Details
Message-ID:
<38o3i9$fpe@newstand.syr.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!uwm.edu!news.moneng.mei.com!sol.ctr.columbia.edu!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!hydra.syr.edu!pjkappesReferences:
<1994Oct25.165909.11714@nlm.nih.gov>Show Full Headers
Complete Article Headers
Message-ID: <38o3i9$fpe@newstand.syr.edu> Subject: Re: How to Search body of messages in group(s) Date: Thu, 27 Oct 1994 11:39:53 +0000 From: pjkappes@hydra.syr.edu (Peter Kappesser) References: <1994Oct25.165909.11714@nlm.nih.gov> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!uwm.edu!news.moneng.mei.com!sol.ctr.columbia.edu!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!hydra.syr.edu!pjkappes Newsgroups: news.software.readers Organization: Not Quite Syracuse University, Syracuse, NY Lines: 29 Reply-To: pjkappes@mailbox.syr.edu NNTP-Posting-Host: 128.230.1.33