These three pin metal cans were very common, especially the LM340 5V regulator which was, of course, a linear regulator. Today, you are more likely to see a 7805 in a TO-220 case or something ...
see the entire Over-voltage Protection Module to handle direct connection of voltage regulators to a 5V battery using standard IO devices datasheet get in contact with Over-voltage Protection Module ...