Sahih Bukhari Volume 1, Book 12, Hadith Number 828

Narated By ‘Aisha : Had Allah’s Apostle known what the women were doing, he would have forbidden them from going to the mosque as the women of Bani Israel had been forbidden. Yahya bin Said (a sub-narrator) asked ‘Amra (another sub-narrator), “Were the women of Bani Israel forbidden?” She replied “Yes.”