Sunan an-Nasa'i, Book 27, Hadith 9 (In-Book)

It was narrated from Ibn 'Umar that he divorced his wife while she was menstruating. He mentioned that to the Prophet and he said: "Tell him to take her back, then divorce her while she is pure (not menstruating) or pregnant."

أَخْبَرَنَا مَحْمُودُ بْنُ غَيْلاَنَ، قَالَ حَدَّثَنَا وَكِيعٌ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، مَوْلَى طَلْحَةَ عَنْ سَالِمِ بْنِ عَبْدِ اللَّهِ، عَنِ ابْنِ عُمَرَ، أَنَّهُ طَلَّقَ امْرَأَتَهُ وَهِيَ حَائِضٌ فَذَكَرَ ذَلِكَ لِلنَّبِيِّ صلى الله عليه وسلم فَقَالَ ‏ "‏ مُرْهُ فَلْيُرَاجِعْهَا ثُمَّ لْيُطَلِّقْهَا وَهِيَ طَاهِرٌ أَوْ حَامِلٌ ‏" ‏ ‏.‏

sunnah.com