It was narrated from Anas that:
The Jews would not sit with a menstruating woman in a house, nor eat with her, nor drink with her. That was mentioned to the Messenger of Allah, then Allah revealed the words: "They ask you concerning menstruation. Say: that is a harmful thing, therefore keep away from women during menses." The Messenger of Allah said: "Do everything except sexual intercourse."
English reference: Vol. 1, Book 1, Hadith 644
Arabic reference: Book 1, Hadith 687