Sahih Bukhari | Volume 1 | Hadith Number 828

Narrated 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."