X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=doc%2Fman7%2Fnotmuch-search-terms.rst;h=248444e3cf989684387cd927aab8361ee996beae;hb=963ccabe93b0564e6979433f5be34395e9aa8ef1;hp=b4d784a300582e083a6cd0be2e97669c33e02bba;hpb=0cbe982bfd4516ee441ca5bbdd858616e54cc141;p=notmuch diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index b4d784a3..248444e3 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -42,7 +42,7 @@ of the prefixes with forms can be also used to restrict the results to those whose value matches a regular expression (see **regex(7)**) delimited with //, for example:: - notmuch search 'from:/bob@.*[.]example[.]com/' + notmuch search 'from:"/bob@.*[.]example[.]com/"' from: or from:// The **from:** prefix is used to match the name or address of @@ -273,6 +273,28 @@ Both of these will match a subject "Free Delicious Pizza" while will not. +Quoting +------- + +Double quotes are also used by the notmuch query parser to protect +boolean terms or regular expressions containing spaces or other +special characters, e.g. + +:: + + tag:"a tag" + +:: + + folder:"/^.*/(Junk|Spam)$/" + +As with phrases, you need to protect the double quotes from the shell +e.g. + +:: + + % notmuch search 'folder:"/^.*/(Junk|Spam)$/"' + DATE AND TIME SEARCH ====================