Article View: news.software.nn
Article #6402Re: nngrab - Specific Searches
From: Wayne Berke
Date: Wed, 14 Sep 1994 14:13
Date: Wed, 14 Sep 1994 14:13
46 lines
2219 bytes
2219 bytes
Nancy McGough <nancym@ii.com> writes: >dmws@uhura.cc.rochester.edu (D. Williams) writes: >>I use nngrab a lot and am wondering how to do a specific search. For example >>if I wanted to find 'com' but not find computer, comfort, etc... >> >>In other words, I am looking for a way to only find the word I am searching >>for and not other words that it is contained within. Thank you. >Try this: >nngrab "^com[^a-zA-Z]|[^a-zA-Z]com[^a-zA-Z]|[^a-zA-Z]com$" >^com[^a-zA-Z] means starts with ``com'' followed by non-alpha >| or >[^a-zA-Z]com[^a-zA-Z] non-alpha ``com'' non-alpha >| or >[^a-zA-Z]com$" ends with ``com'' preceded by non-alpha Note that this will also match subjects that contain "com1" or "3com". A cleaner way of doing it is by using the \< and \> metacharacters. They specify word brackets: nngrab "\<com\>" >Instead of nngrab I usually use nn with the appropriate flags, i.e.: >nn -mxXs/"^com[^a-zA-Z]|[^a-zA-Z]com[^a-zA-Z]|[^a-zA-Z]com$" >Because that way I can customize the flags, e.g., use n instead of s >if I'm searching the Name field. >Hope this helps, >Nancy >-- > ** ** Nancy McGough | "No one suspects the >* ** * Infinite Ink | days to be gods." > ** ** ftp://ftp.ii.com/pub/ii | -Emerson -- Wayne Berke berke@panix.com
Technical Details
Message-ID:
<3570dg$b9e@news.panix.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!panix!berkeReferences:
<1994Sep5.151159.21584@galileo.cc.rochester.edu> <353fga$s3r@news.halcyon.com>Show Full Headers
Complete Article Headers
Message-ID: <3570dg$b9e@news.panix.com> Subject: Re: nngrab - Specific Searches Date: Wed, 14 Sep 1994 14:13:04 +0000 From: berke@panix.com (Wayne Berke) References: <1994Sep5.151159.21584@galileo.cc.rochester.edu> <353fga$s3r@news.halcyon.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!panix!berke Newsgroups: news.newusers.questions,news.software.nn Organization: Nalgame Dios, Ltd. Lines: 46 NNTP-Posting-Host: berke.dialup.access.net X-Newsreader: NN version 6.5.0 #1