A person who tries to exploit a set of rules, typically by reading them too literally in a way that defies their purpose, or by picking and choosing which rules apply when it suits them.
Game night dragged on for hours because the rules lawyer kept digging up obscure clauses to win every argument.