Command him to take her back and when she is pure, then divorce her. I said to Ibn 'Umar Allah be pleased with them): Did you count that pronouncement of divorce? He said: Why not? (Using translation from Muslim 1471p)
طَلَّقْتُ امْرَأَتِي وَهِيَ حَائِضٌ فَأَتَى عُمَرُ النَّبِيَّ ﷺ فَأَخْبَرَهُ فَقَالَ مُرْهُ فَلْيُرَاجِعْهَا ثُمَّ إِذَا طَهُرَتْ فَلْيُطَلِّقْهَا قُلْتُ لِابْنِ عُمَرَ أَحَسِبَ تِلْكَ التَّطْلِيقَةَ قَالَ فَمَهْ