What are the regulations for the King and what will he learn from doing this?
Answer From The Annual Reading Schedule - Week 45 Notes For Deuteronomy: He cannot be from the foreigners (Deuteronomy 17:15). He should not greatly increase horses, wives, silver, or gold for himself (Deuteronomy 17:16-17). He should not cause the people to return to Mitsrayim (Egypt) to increase horses (Deuteronomy 17:16). He writes a copy of the Torah from the copy of the priests' (Deuteronomy 17:18). He reads it all the days of His life (Deuteronomy 17:19).
By reading this all the days of his life, he will learn to fear Yahweh and guard all the words of the Laws to do them, and his heart will not be lifted up above his brothers, to not turn aside right or left.