[Top] [All Lists]

Re: [nmh-workers] Stupid 'pick' question...

2019-06-07 18:19:54
On Fri, 07 Jun 2019 19:00:52 -0400 "Valdis =?utf-8?Q?Kl=c4=93tnieks?=" 
<valdis.kletnieks@vt.edu> wrote:

So.... trying to work with the linux-kernel mailing list firehose (800-1500
messages a day), and hitting a problem with 'pick'.

Am trying to match all messages from a given person with a given part of
a subject line.

pick -from <address> -subject '\[PATCH [45]\.[0-9]'

*almost* does what I want - catch all messages that have '[PATCH 4.9]'
or '[PATCH 4.14]'  or '[PATCH 5.0]'.  However, it *also* catches messages
of the form 'Subject: Re: [PATCH ....' which is unacceptable for the use case
in question.

So I tried an anchored search using -subject '^\[PATCH [45]\.[0-9]' but that
results in nothing matching. So much for this from the manpage:

    man pick
to see why.

        -subject '^foo'
is equivalent to
        -search "subject[ \t]*:.*^foo'
which won't match anything.

Oddly enough, $ for tail-anchor seems to work:

This makes sense since
         -subj 'foo$' is
        -search "subject[ \t]*:.*foo$'

You can directly use search as follows:

        -search 'Subject[ \t]:[ \t]*\[PATCH [45]\.[0-9]'


<Prev in Thread] Current Thread [Next in Thread>