Go by the book

To follow the rules exactly.

Most police officers go by the book when they arrest a criminal.