You are free of menses only when you see the white discharge. Bleeding prior to that is considered as due to menses unless your bleeding exceeds the regular pattern of menses you used to experience.
In this case, you should go by the regular pattern of menses you had had prior to this irregular bleeding. In other words, if you used to menstruate six or seven days, then that is your regular pattern; any irregular bleeding that comes after shall be treated as due to istihadhah which is due to hormonal imbalance and therefore, it cannot be considered as menses.
The rule of istihadhah is different from that of menses; in the case of istihdadhah you simply need to wash your private parts and renew wudhu prior to each prayer you intend to perform; you are supposed to do so only close to the performance of the intended prayer.
For details, you may refer to the answers linked below.