Emphasizing or observing the letter but not the spirit of the law

Looking for a word that refers to:

The emphasis or observation of a rule (or law) to the letter, in a way that violates the spirit (or original good intention) of that rule (or law).


Solution 1:

"Pedantic?" "Pharasee?"(a member of an ancient Jewish sect, distinguished by strict observance of the traditional and written law)

Solution 2:

In a bureaucracy, rules are so literally followed that often, the spirit in which the rule was made in the first place does not matter.

Collins:

bureaucracy noun [plural -cies]

4. any administration in which action is impeded by unnecessary official procedures and red tape

Collins English Dictionary. Copyright © Harper Collins Publishers

Urban Dictionary:

Bureaucracy

2. A form of government, the authority of which is not so much to accomplish anything, but to obstruct accomplishment by anyone else.

Solution 3:

Are you thinking to a blind application of law ?

For example:

the blind application of law can occasion injustices which are potentially greater than the crime being policed.

.

My point here is that the "law" has been changed in the past and the situation must be evaluated based upon it merits. Sadly, the blind application of law seems more important that looking at the merits.