Catalysis of the specific cleavage of the beta-(1->4) glycosidic linkage between N-acetylmuramyl and N-acetylglucosaminyl residues in peptidoglycan, with the concomitant formation of 1,6-anhydro-N-acetylmuramyl residues. Acts on linkages within peptidoglycan chains (i.e. not at the ends) to produce shorter strands with 1,6-anhydromuramic acid ends.