Christ roundly and repeatedly condemned the Pharisees for following the Letter of the Law.
If one reads a bit more deeply, one finds that the Pharisees were guilty of using the Letter of the Law to avoid the higher obligation.
An example is the Pharisee who tithes, and uses his tithing as a means of avoiding caring for his parents.
Another example of Spirit vs. Letter is where the Pharisees sought to condemn Christ and His disciples for shucking grain and eating it on the Sabbath; the Letter of the Law forbid work. His retort was that the Sabbath was made for man, not man for the Sabbath.
Following the Spirit of the Law is not a means to avoiding the Letter of the Law; it is a means of understanding what the real purpose of the Law is, and keeping the Letter of the Law in the context of the two great Commandments: Love God with your whole heart, mind and soul, and the second is Love your neighbor as yourself.
Another example comes from a married couple: the husband works hard and makes a larger than normal pay check: he does so by working a 60 to 80 hour work week. He doesn’t have an affair; he gives his check to his wife; he doesn’t physically or emotionally abuse her; and that is pretty much the sum total of their marriage. He has not broken the Letter of the Law; but to say that he loves her is a joke. He has no emotions for her; she is essentially his maid, nanny of the children he doesn’t see or spend time with, cook and occasional source of sexual relief. He doesn’t question her spending as long as it is not in excess of his income; she has the right clothes, drives the right car, goes to the beauty parlor on a regular basis and takes the children to the proper private school, and he has no clue what happened when he is served with the divorce papers, claiming “What is it she wants?” in total incomprehension. He has followed the Letter of the Law exactly. He has no idea whatsoever what the Spirit of the Law is about.