Anas bin Malik reported,

The Jews would not sit with a menstruating woman in the same house, nor eat or drink with her. This was mentioned to the Prophet ﷺ, and Allah revealed, "They ask you about menstruation. Say, it is harmful, so keep away from women during menstruation" [Baqarah 2:222]. The Messenger of Allah ﷺ then said, "Do everything except sexual intercourse."

Ibn Majah 644

Sahih

حدثنا محمد بن يحيى حدثنا أبو الوليد حدثنا حماد بن سلمة عن ثابت

عن أنس

أن اليهود كانوا لا يجلسون مع الحائض في بيت ولا يأكلون ولا يشربون قال فذكر ذلك للنبي ﷺ فأنزل الله {ويسألونك عن المحيض قل هو أذى فاعتزلوا النساء في المحيض} فقال رسول الله ﷺ اصنعوا كل شيء إلا الجماع

ابن ماجه 644صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Purification and its sunnahs
Chapter
Eating with a menstruating woman and her leftover food
Numbering
Darussalam 644
Ibn Majah 644