Hydrolyzes the cross-linked dimers tetrapentapeptide (D45) and tetratetrapeptide (D44). Removes the terminal D-alanine from muropeptides and disaccharide pentapeptide M5 with a C-terminal D-Ala-D-Ala dipeptide. Associated with recycling and remodeling of peptidoglycan (PG) (By similarity). Inhibited by cefmetazole. Belongs to the beta-lactamase family.