If you think this you missed the mark; its not about getting a haircut or trimming your beard. Some say "so if you ever shaved our had a haircut, you've broken the law."
Not true because in other passages of scripture, specifically the New Testament its states that long hair is a disgrace to a man. So if long hair is a disgrace then the ONLY way to rectify that is by cutting your hair. IF cutting your hair was a sin, then we need to throw out the NT because it contradicts with God's commandment. Consider the NT where Paul and other believers took the Nazarite vow - guess what that involved? Yep cutting one's hair. So is the bible full of contradictions or is our interpretation flawed?
Scripture states God does not lie and that He is the same yesterday, today and forever. So either the bible is wrong or your statement/belief about haircuts is wrong. I'll stick with God and His word and here is way.
The commandment 'don't round the corners of hear or mar the corners of your beard' is in regards to a pagan practice of ripping out your hair to show reverence and or to compel the false god/s to answer your prayers. If you looked up the Hebrew word נָקַף naqaph (the word for round) means strike off, to rip out round the compass of the head (ever seen the old pictures of pagan followers who had a circular bald spot? thats it and it was a way to pay reverence & homage to the sun god, which goes back to Nimrod). The Hebrew word שָׁחַת shachath (the word used for 'mar') means to corrupt, to ruin, to injure.
You see one of the telltale traits of false gods of the time was that the god/s would not listen unless the followers injured themselves; it was a way of showing devotion and only MAYBE would god/s answer.
What most people don't understand (just like I used to do) is that the Hebrew is about producing results. Its not just hearing God's word but also doing it. Something the apostle Paul talked about - don't just be hearers of the word but doers! We also need to take the time to study and research the times and peoples when these passages were written. If you don't then you make the mistake like you did (BTDT).
BTW if you say that the pharisees missed the spirit of the law, in ways, they did but Yeshua/Jesus rebuked them mostly for adding to and taking away from God's commandments; IOW they made up their own laws, commandments which scripture refers to as 'doctrines and traditions of men'. That was what Yeshua was rebuking them for the most part.
BTW Jesus did not obey all 613 laws ;)