Mass delete lines in VIM

In VIM, one of the features I always manage to forget exists is the g ex command. Recently I had the need to delete all lines in a file containing a certain pattern. Using the g ex command, this sort…