All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
A woman who has blood discharges for a period of six weeks is not in menses for all this time period; rather, she would be in menses during some time of this period, and having bleeding outside the monthly periods at some other time of this period. Therefore, if you used to have precise monthly periods, meaning that you know the period when you are in menses and the number of days that your menses last, then you should not perform the prayer or fast or do anything from which a woman in menses should refrain from during this period, and when the time of your menses finishes, then you should perform Ghusl (a ritual bath) and perform the prayer and consider that the bleeding discharges which you have after this period as being bleeding outside the monthly periods. Then when the time of your regular menses comes again, then you should refrain from anything a woman in menses should refrain from, and consider yourself as being in menses, then when the time of these menses ends, then you should take a ritual bath and perform the prayer and consider yourself as having bleeding outside the monthly periods and so forth. The evidence about this is that the Prophet said to Faatimah bint Hubaysh when she complained to him that she gets persistent bleeding from the uterus and does not become pure, so he told her: “That is from a blood vessel and not menses. So when your real menses begin, you should give up your prayers and when it has finished, you should wash off the blood (perform Ghusl) and offer your prayers.” [Al-Bukhari and Muslim]
This is if you know the period of your menses and the number of its days, and then after this, you are considered pure after the days of your menses. Besides, we draw your attention to the fact that you are not permitted to abandon the prayer more than 15 days continuously and that the minimum period of time of purity between two menses is 15 days, however, the period of purity may be more than this period and there is no limit for it.
Therefore, if you had performed the prayer during the time of your monthly periods while knowing that this is forbidden and you are sure that this is your monthly periods, then you are sinful and you are obliged to repent.
For more benefit, please refer to Fataawa 84479 and 83621.
Allaah Knows best.