This posting is part of a series on small and sometimes not-so-easy-to-discover functionality in Bugzilla that makes developers’ and users’ lifes more comfortable. It’s based on conversations with users and developers in the last months.
Sometimes you want to search for a specific field being empty, e.g. bug reports without anybody on the CC list.
If you go to Bugzilla’s advanced search and scroll down to the “Custom Search” (called “Boolean Search” in older Bugzilla versions), you can use “matches regular expression” and respectively “does not match regular expression”. Regular expressions (regexes) are powerful patterns to match a certain string (the corresponding Wikipedia article provides more information).
To find all bug reports that have no keywords, enter this:
^$ is the regular expression for an empty string.
As written before, regexes are very powerful. For example, you could also search for comments in Bugzilla that contain inline Git-formatted patches by using Comment | matches regular expression | —[[:space:]].+[[:space:]]\+\+\+[[:space:]].+[[:space:]]@@[[:space:]].+@@[[:space:]]
As can be seen, the MySQL database requires using [[:space:]] instead of \s for a whitespace character, see its documentation.