string search in "rn"

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Wed Jan 16 09:20:32 AEST 1991


In article <19522 at hydra.gatech.EDU> mb33 at prism.gatech.EDU (Martin Brooks) writes:
: 
: In one of my KILL files, I have a couple of search commands to flag
: articles that were posted locally:
: 
:    /string1/h:=
:    /srting2/h:=
: 
: Is there a way to search for both strings with one command.  I *did*
: RTFM but either it didn't mention anything or I overlooked it.

    /string1\|string2/h:=

If you know the header line, you can also get fancy with %(), like this

    /^/%(%[from]!=string1\|string2?j:=)

This lists the article if the From: line contains string1 or string2,
otherwise it junks the article.

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Comp.unix.questions mailing list