EDIT: This should show commits with author names that do not contain "John" "Paul" or "Ringo". Requires git to be built with PCRE.
git log --perl-regexp --author='^(?!(.*(John|Paul|Ringo)))'
I'll leave previous variants below as they still may be of some use:
You should be able to do it using negative look-behind assertion, if your git is compiled with PCRE support. Something like this should do what you want:
git log --perl-regexp --author='(?<!(john|paul|ringo))@'
Note that the regex is actually looking for @
not preceded by john|paul|ringo
. Getting this to work with names will be tricker as there may not be a convenient way to find an 'anchor' that's not preceded by the name you want to exclude.
You can try anchoring off beginning of the author line and show only commits that do not start with John|Paul|Ringo
(i.e commits with John as the middle name would still be shown):
git log --perl-regexp --author='^(?!(John|Paul|Ringo))'