Umm Salama bint Abu Umaya reported,

A woman was suffering from continuous bleeding during the time of the Messenger of Allah ﷺ. Umm Salama sought a ruling on her behalf from the Messenger of Allah ﷺ, and he said, "Let her count the number of nights and days she used to menstruate each month before this affliction came upon her, and let her abstain from prayer for that portion of the month. Once that period has passed, let her perform a full bath, fasten a cloth tightly around herself, and then pray."

Nasai 355

Sahih

أخبرنا قتيبة عن مالك عن نافع عن سليمان بن يسار

عن أم سلمة

أن امرأة كانت تهراق الدم على عهد رسول الله ﷺ استفتت لها أم سلمة رسول الله ﷺ فقال لتنظر عدد الليالي والأيام التي كانت تحيض من الشهر قبل أن يصيبها الذي أصابها فلتترك الصلاة قدر ذلك من الشهر فإذا خلفت ذلك فلتغتسل ثم لتستثفر بالثوب ثم لتصل

النسائي 355صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Menstruation and istihadah
Chapter
Woman who has known days in which she menstruates each month
Numbering
Darussalam 355
Nasai 355