[Patch v2] lib: regexp matching in 'subject' and 'from'

David Bremner david at tethera.net
Wed Jan 18 13:01:29 PST 2017


Jani Nikula <jani at nikula.org> writes:


> I played around with this a bit, and it seemed to work. Unsurprisingly,
> getting the quoting right was the hardest part. Even though I know how
> the stuff works under the hood, it took me a while to realize that you
> have to use 're:"subject:<regex with spaces>"' to make it work. (I kept
> trying 're:subject:"<regex with spaces>"'.) I don't know if there's
> anything we could really do about this.
>

I _think_ we could add distinct prefixes at the xapian level for each
regex-prefix. That opens the can of worms of naming them eg re-subject:
and re-from:. I'm not sure about the added complexity, but I think it's
a matter of adding an extra argument to the field processor constructor.

d


More information about the notmuch mailing list