letter of the law

The precise wording rather than the spirit or intent. For example, Since it was the first time he'd broken the rules, the school decided to ignore the letter of the law and just give him a warning. [Late 1500s]