Xkcd 1313: Regex Golf (2014)
nbviewer.ipython.org
nbviewer.ipython.org
Also, instead of "matches the last names of elected US presidents but not their opponents", would it be clearer to express "matches the last names of presidential candidates who got elected at some point, but not those who never became presidents" - or along these lines (sorry for the grammar). This is then a mutually exclusive list, and no interpretation problem.